[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r14205: Free authority certs on exit. Backport candidate. (in tor/trunk: . src/or)
Author: nickm
Date: 2008-03-26 17:16:56 -0400 (Wed, 26 Mar 2008)
New Revision: 14205
Modified:
tor/trunk/
tor/trunk/ChangeLog
tor/trunk/src/or/routerlist.c
Log:
r19079@catbus: nickm | 2008-03-26 17:16:46 -0400
Free authority certs on exit. Backport candidate.
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r19079] on 8246c3cf-6607-4228-993b-4d95d33730f1
Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog 2008-03-26 21:08:39 UTC (rev 14204)
+++ tor/trunk/ChangeLog 2008-03-26 21:16:56 UTC (rev 14205)
@@ -15,6 +15,8 @@
running with dmalloc would crash. Bugfix on 0.2.0.x-alpha.
- Keep address policies from leaking: start their refcount at 1, not
2. Bugfix on 0.2.0.16-alpha.
+ - Free authority certificates on exit, so they don't look like memory
+ leaks. Bugfix on 0.2.0.19-alpha.
o Minor features:
- Allow separate log levels to be configured for different logging
Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c 2008-03-26 21:08:39 UTC (rev 14204)
+++ tor/trunk/src/or/routerlist.c 2008-03-26 21:16:56 UTC (rev 14205)
@@ -2628,6 +2628,16 @@
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