]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Make OPENSSL_free(dh_string_repr) conditional.
authorNick Mathewson <nickm@torproject.org>
Mon, 10 Jun 2013 17:49:13 +0000 (13:49 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 10 Jun 2013 17:49:13 +0000 (13:49 -0400)
src/common/crypto.c

index adbf6396d021f80a4ec0b2eef855fbe6cf74b7e9..e60172b744e03ba26fd381d80c3c935814f92eb2 100644 (file)
@@ -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);