summaryrefslogtreecommitdiff
path: root/src/common/timers.h
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/timers.h
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/timers.h')
-rw-r--r--src/common/timers.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/timers.h b/src/common/timers.h
index 6c9594d31b..86e8920169 100644
--- a/src/common/timers.h
+++ b/src/common/timers.h
@@ -18,7 +18,7 @@ void timer_get_cb(const tor_timer_t *t,
void timer_schedule(tor_timer_t *t, const struct timeval *delay);
void timer_disable(tor_timer_t *t);
void timer_free_(tor_timer_t *t);
-#define timer_free(t) FREE_AND_NULL(timer, (t))
+#define timer_free(t) FREE_AND_NULL_UNMATCHED(tor_timer_t, timer_free_, (t))
void timers_initialize(void);
void timers_shutdown(void);