aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-06-10 13:49:13 -0400
committerNick Mathewson <nickm@torproject.org>2013-06-10 13:49:13 -0400
commit7f9066ceee32f4df6d94b18c7b65e92d1730fce8 (patch)
tree565506e529fff0138a6b101bde971d9d857b66a5
parentaaaf082ed69d2fa75c8a2f79f42a67ee18ee3865 (diff)
downloadtor-7f9066ceee32f4df6d94b18c7b65e92d1730fce8.tar
tor-7f9066ceee32f4df6d94b18c7b65e92d1730fce8.tar.gz
Make OPENSSL_free(dh_string_repr) conditional.
-rw-r--r--src/common/crypto.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c
index adbf6396d..e60172b74 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -1740,7 +1740,8 @@ crypto_store_dynamic_dh_modulus(const char *fname)
done:
if (dh)
DH_free(dh);
- OPENSSL_free(dh_string_repr);
+ if (dh_string_repr)
+ OPENSSL_free(dh_string_repr);
tor_free(base64_encoded_dh);
tor_free(file_string);