summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-10-16 20:38:57 +0000
committerNick Mathewson <nickm@torproject.org>2004-10-16 20:38:57 +0000
commita42adce3628c9b82c91ff21e85c6a2d4fbcefc13 (patch)
treeb7f04f7a405e5638f21ad1fd86d77e216e517d75 /src/common
parentb0afd91afec362e3edc58d1928d2a63bcb3097e8 (diff)
downloadtor-a42adce3628c9b82c91ff21e85c6a2d4fbcefc13.tar.gz
tor-a42adce3628c9b82c91ff21e85c6a2d4fbcefc13.zip
fix memory leak in router.c; start relying on NULL==(zero bytes)
svn:r2538
Diffstat (limited to 'src/common')
-rw-r--r--src/common/crypto.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c
index 7826512058..651822254c 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -1200,8 +1200,7 @@ crypto_dh_env_t *crypto_dh_new()
if (!dh_param_p)
init_dh_param();
- res = tor_malloc(sizeof(crypto_dh_env_t));
- res->dh = NULL;
+ res = tor_malloc_zero(sizeof(crypto_dh_env_t));
if (!(res->dh = DH_new()))
goto err;