aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/or/router.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 3420674fe..a21d5cb51 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -299,8 +299,12 @@ init_v3_authority_keys(const char *keydir)
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;