瀏覽代碼

Make OPENSSL_free(dh_string_repr) conditional.

Nick Mathewson 12 年之前
父節點
當前提交
7f9066ceee
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/common/crypto.c

+ 2 - 1
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);