From 176ad729d9b1ddeccdb3e721b5ab1bf64646223f Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 21 Nov 2017 09:37:47 -0500 Subject: Change the free macro convention in the rest of src/or/*.h --- src/or/microdesc.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/or/microdesc.h') 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); -- cgit v1.2.3-54-g00ecf