summaryrefslogtreecommitdiff
path: root/src/or/microdesc.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-12-12 02:07:59 -0500
committerNick Mathewson <nickm@torproject.org>2009-12-12 02:07:59 -0500
commit0c1b3070cfec670190636d74f97c2aaf0e521bdb (patch)
treeba893e6987f7b429510cec38a1cb6aaf0dc13793 /src/or/microdesc.c
parent79f72d0ef6cc3ce7cc92146ed0f0bdc7a4acad1a (diff)
downloadtor-0c1b3070cfec670190636d74f97c2aaf0e521bdb.tar.gz
tor-0c1b3070cfec670190636d74f97c2aaf0e521bdb.zip
Now that FOO_free(NULL) always works, remove checks before calling it.
Diffstat (limited to 'src/or/microdesc.c')
-rw-r--r--src/or/microdesc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/microdesc.c b/src/or/microdesc.c
index 7a65705088..c1f447c5df 100644
--- a/src/or/microdesc.c
+++ b/src/or/microdesc.c
@@ -337,6 +337,8 @@ microdesc_cache_rebuild(microdesc_cache_t *cache)
void
microdesc_free(microdesc_t *md)
{
+ if (!md)
+ return;
/* Must be removed from hash table! */
if (md->onion_pkey)
crypto_free_pk_env(md->onion_pkey);