[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] fix memory leak in router.c; start relying on NULL==(zero b...



Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/tmp/cvs-serv16599/src/common

Modified Files:
	crypto.c 
Log Message:
fix memory leak in router.c; start relying on NULL==(zero bytes)

Index: crypto.c
===================================================================
RCS file: /home/or/cvsroot/src/common/crypto.c,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -d -r1.111 -r1.112
--- crypto.c	13 Oct 2004 05:54:58 -0000	1.111
+++ crypto.c	16 Oct 2004 20:38:56 -0000	1.112
@@ -1200,8 +1200,7 @@
   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;