summaryrefslogtreecommitdiff
path: root/src/common/log.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-12-04 15:09:18 -0500
committerNick Mathewson <nickm@torproject.org>2017-12-08 14:47:19 -0500
commitdb024adc90069ce9961f3993aba1b7372f09d77a (patch)
treebf42a6612ab7f26e6886604ba08e924dca6a28c6 /src/common/log.c
parent176ad729d9b1ddeccdb3e721b5ab1bf64646223f (diff)
downloadtor-db024adc90069ce9961f3993aba1b7372f09d77a.tar.gz
tor-db024adc90069ce9961f3993aba1b7372f09d77a.zip
Switch to a safer FREE_AND_NULL implementation
This one only evaluates the input once, so it cannot mess up even if there are side effects.
Diffstat (limited to 'src/common/log.c')
-rw-r--r--src/common/log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/log.c b/src/common/log.c
index 83098b1011..d305c9ae5e 100644
--- a/src/common/log.c
+++ b/src/common/log.c
@@ -65,7 +65,7 @@ typedef struct logfile_t {
static void log_free_(logfile_t *victim);
#define log_free(lg) \
- FREE_AND_NULL(log, (lg))
+ FREE_AND_NULL_UNMATCHED(logfile_t, log_free_, (lg))
/** Helper: map a log severity to descriptive string. */
static inline const char *