summaryrefslogtreecommitdiff
path: root/src/or/routerlist.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-11-21 09:37:47 -0500
committerNick Mathewson <nickm@torproject.org>2017-12-08 14:47:19 -0500
commit176ad729d9b1ddeccdb3e721b5ab1bf64646223f (patch)
treebe4ff3e62b459859c7c87bf663a37e3806eac8f9 /src/or/routerlist.h
parent0792cc107ef588b9f9fa27165b73e19fbf07e92b (diff)
downloadtor-176ad729d9b1ddeccdb3e721b5ab1bf64646223f.tar.gz
tor-176ad729d9b1ddeccdb3e721b5ab1bf64646223f.zip
Change the free macro convention in the rest of src/or/*.h
Diffstat (limited to 'src/or/routerlist.h')
-rw-r--r--src/or/routerlist.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/or/routerlist.h b/src/or/routerlist.h
index 8384c7eb8c..18f0670ead 100644
--- a/src/or/routerlist.h
+++ b/src/or/routerlist.h
@@ -96,9 +96,12 @@ 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, (router))
+void extrainfo_free_(extrainfo_t *extrainfo);
+#define extrainfo_free(ei) FREE_AND_NULL(extrainfo, (ei))
+void routerlist_free_(routerlist_t *rl);
+#define routerlist_free(rl) FREE_AND_NULL(routerlist, (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 +194,8 @@ 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, (cert))
void clear_dir_servers(void);
void update_consensus_router_descriptor_downloads(time_t now, int is_vote,
networkstatus_t *consensus);