[or-cvs] Fix two dumb leaks in crypto.c

Nick Mathewson nickm at seul.org
Mon Apr 12 05:27:40 UTC 2004


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

Modified Files:
	crypto.c 
Log Message:
Fix two dumb leaks in crypto.c

Index: crypto.c
===================================================================
RCS file: /home/or/cvsroot/src/common/crypto.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- crypto.c	8 Apr 2004 20:56:33 -0000	1.75
+++ crypto.c	12 Apr 2004 05:27:38 -0000	1.76
@@ -351,6 +351,7 @@
   if (env->key)
     RSA_free(env->key);
   env->key = PEM_read_bio_RSAPublicKey(b, NULL, NULL, NULL);
+  BIO_free(b);
   if(!env->key)
     return -1;
 
@@ -708,6 +709,7 @@
     free(buf);
     return -1;
   }
+  free(buf);
   return 0;
 }
 



More information about the tor-commits mailing list