aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-02-07 08:54:54 -0500
committerNick Mathewson <nickm@torproject.org>2017-02-07 08:54:54 -0500
commite6965f78b80e2b83367df05e204c97f5c0929a3c (patch)
treef833c83b2252897c672302a177411b851687f6f1 /src/common
parent8936c50d83f3a90fb6bb3314b86f56f46d42d749 (diff)
parent6b37512dc76152926a16d93f2be52083cd5ae436 (diff)
downloadtor-e6965f78b80e2b83367df05e204c97f5c0929a3c.tar.gz
tor-e6965f78b80e2b83367df05e204c97f5c0929a3c.zip
Merge branch 'maint-0.2.5' into maint-0.2.6
Diffstat (limited to 'src/common')
-rw-r--r--src/common/crypto.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c
index 8402ca079a..8db9681539 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -555,8 +555,10 @@ crypto_pk_generate_key_with_bits(crypto_pk_t *env, int bits)
{
tor_assert(env);
- if (env->key)
+ if (env->key) {
RSA_free(env->key);
+ env->key = NULL;
+ }
{
BIGNUM *e = BN_new();