diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 98e505653d..dd16e4b06b 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -2988,6 +2988,7 @@ signed_descriptor_free(signed_descriptor_t *sd) return; tor_free(sd->signed_descriptor_body); + tor_cert_free(sd->signing_key_cert); memset(sd, 99, sizeof(signed_descriptor_t)); /* Debug bad mem usage */ tor_free(sd); @@ -3005,6 +3006,7 @@ signed_descriptor_from_routerinfo(routerinfo_t *ri) memcpy(sd, &(ri->cache_info), sizeof(signed_descriptor_t)); sd->routerlist_index = -1; ri->cache_info.signed_descriptor_body = NULL; + ri->cache_info.signing_key_cert = NULL; routerinfo_free(ri); return sd; }