r19268@catbus: nickm | 2008-04-09 14:20:54 -0400

Backport 14205: Free authority certificates on exit, so they dont look like memory leaks.


svn:r14332
This commit is contained in:
Nick Mathewson
2008-04-09 18:24:50 +00:00
parent ae0d14d346
commit 27ddacce62
3 changed files with 14 additions and 1 deletions
+11
View File
@@ -2628,6 +2628,17 @@ routerlist_free_all(void)
smartlist_free(trusted_dir_servers);
trusted_dir_servers = NULL;
}
if (trusted_dir_certs) {
DIGESTMAP_FOREACH(trusted_dir_certs, key, cert_list_t *, cl) {
SMARTLIST_FOREACH(cl->certs, authority_cert_t *, cert,
authority_cert_free(cert));
smartlist_free(cl->certs);
tor_free(cl);
} DIGESTMAP_FOREACH_END;
digestmap_free(trusted_dir_certs, NULL);
trusted_dir_certs = NULL;
}
}
/** Forget that we have issued any router-related warnings, so that we'll