diff options
-rw-r--r-- | src/or/router.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/router.c b/src/or/router.c index d684745907..d24c4486f1 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -60,6 +60,8 @@ static void set_onion_key(crypto_pk_env_t *k) { tor_mutex_acquire(key_lock); + if (onionkey) + crypto_free_pk_env(onionkey); onionkey = k; onionkey_set_at = time(NULL); tor_mutex_release(key_lock); |