summaryrefslogtreecommitdiff
path: root/src/or/routerlist.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/routerlist.h')
-rw-r--r--src/or/routerlist.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/or/routerlist.h b/src/or/routerlist.h
index 8384c7eb8c..83f4d1002f 100644
--- a/src/or/routerlist.h
+++ b/src/or/routerlist.h
@@ -96,9 +96,13 @@ MOCK_DECL(signed_descriptor_t *,extrainfo_get_by_descriptor_digest,
const char *signed_descriptor_get_body(const signed_descriptor_t *desc);
const char *signed_descriptor_get_annotations(const signed_descriptor_t *desc);
routerlist_t *router_get_routerlist(void);
-void routerinfo_free(routerinfo_t *router);
-void extrainfo_free(extrainfo_t *extrainfo);
-void routerlist_free(routerlist_t *rl);
+void routerinfo_free_(routerinfo_t *router);
+#define routerinfo_free(router) \
+ FREE_AND_NULL(routerinfo_t, routerinfo_free_, (router))
+void extrainfo_free_(extrainfo_t *extrainfo);
+#define extrainfo_free(ei) FREE_AND_NULL(extrainfo_t, extrainfo_free_, (ei))
+void routerlist_free_(routerlist_t *rl);
+#define routerlist_free(rl) FREE_AND_NULL(routerlist_t, routerlist_free_, (rl))
void dump_routerlist_mem_usage(int severity);
void routerlist_remove(routerlist_t *rl, routerinfo_t *ri, int make_old,
time_t now);
@@ -191,7 +195,9 @@ dir_server_t *fallback_dir_server_new(const tor_addr_t *addr,
const char *id_digest, double weight);
void dir_server_add(dir_server_t *ent);
-void authority_cert_free(authority_cert_t *cert);
+void authority_cert_free_(authority_cert_t *cert);
+#define authority_cert_free(cert) \
+ FREE_AND_NULL(authority_cert_t, authority_cert_free_, (cert))
void clear_dir_servers(void);
void update_consensus_router_descriptor_downloads(time_t now, int is_vote,
networkstatus_t *consensus);