summaryrefslogtreecommitdiff
path: root/src/or/microdesc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/microdesc.h')
-rw-r--r--src/or/microdesc.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/microdesc.h b/src/or/microdesc.h
index 1be12156a4..83a90bd8ff 100644
--- a/src/or/microdesc.h
+++ b/src/or/microdesc.h
@@ -38,8 +38,10 @@ smartlist_t *microdesc_list_missing_digest256(networkstatus_t *ns,
digest256map_t *skip);
void microdesc_free_(microdesc_t *md, const char *fname, int line);
-#define microdesc_free(md) \
- microdesc_free_((md), __FILE__, __LINE__)
+#define microdesc_free(md) do { \
+ microdesc_free_((md), __FILE__, __LINE__); \
+ (md) = NULL; \
+ } while (0)
void microdesc_free_all(void);
void update_microdesc_downloads(time_t now);