summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
Diffstat (limited to 'src/or')
-rw-r--r--src/or/router.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 29803b2c91..287c841e5e 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -95,6 +95,8 @@ get_onion_key_set_at(void)
void
set_identity_key(crypto_pk_env_t *k)
{
+ if (identitykey)
+ crypto_free_pk_env(identitykey);
identitykey = k;
}