[or-cvs] r11428: Fix a memory leak when reloading v3 authority certificate an (in tor/trunk: . src/or)
nickm at seul.org
nickm at seul.org
Tue Sep 11 20:17:24 UTC 2007
Author: nickm
Date: 2007-09-11 16:17:24 -0400 (Tue, 11 Sep 2007)
New Revision: 11428
Modified:
tor/trunk/
tor/trunk/src/or/router.c
Log:
r15047 at catbus: nickm | 2007-09-11 13:40:54 -0400
Fix a memory leak when reloading v3 authority certificate and keys.
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r15047] on 8246c3cf-6607-4228-993b-4d95d33730f1
Modified: tor/trunk/src/or/router.c
===================================================================
--- tor/trunk/src/or/router.c 2007-09-11 20:17:22 UTC (rev 11427)
+++ tor/trunk/src/or/router.c 2007-09-11 20:17:24 UTC (rev 11428)
@@ -299,8 +299,12 @@
parsed->cache_info.signed_descriptor_len = eos-cert;
cert = NULL;
- /* Free old values! XXXX020 */
-
+ /* Free old values... */
+ if (authority_key_certificate)
+ authority_cert_free(authority_key_certificate);
+ if (authority_signing_key)
+ crypto_free_pk_env(authority_signing_key);
+ /* ...and replace them. */
authority_key_certificate = parsed;
authority_signing_key = signing_key;
parsed = NULL;
More information about the tor-commits
mailing list