cvs: php-src /ext/openssl openssl.c
| From: | Rob Richards | Date: | Tue, 15 Jan 2008 15:12:12 +0000 |
| Subject: | cvs: php-src /ext/openssl openssl.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-47848@lists.php.net to get a copy of this message | ||
rrichards Tue Jan 15 15:12:12 2008 UTC
Modified files:
/php-src/ext/openssl openssl.c
Log:
fix memleak in sign and verify functions
http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.154&r2=1.155&diff_format=u
Index: php-src/ext/openssl/openssl.c
diff -u php-src/ext/openssl/openssl.c:1.154 php-src/ext/openssl/openssl.c:1.155
--- php-src/ext/openssl/openssl.c:1.154 Wed Jan 9 16:46:52 2008
+++ php-src/ext/openssl/openssl.c Tue Jan 15 15:12:12 2008
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: openssl.c,v 1.154 2008/01/09 16:46:52 rrichards Exp $ */
+/* $Id: openssl.c,v 1.155 2008/01/15 15:12:12 rrichards Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -3754,6 +3754,7 @@
efree(sigbuf);
RETVAL_FALSE;
}
+ EVP_MD_CTX_cleanup(&md_ctx);
if (keyresource == -1) {
EVP_PKEY_free(pkey);
}
@@ -3804,6 +3805,7 @@
EVP_VerifyInit (&md_ctx, mdtype);
EVP_VerifyUpdate (&md_ctx, data, data_len);
err = EVP_VerifyFinal (&md_ctx, (unsigned char *)signature, signature_len, pkey);
+ EVP_MD_CTX_cleanup(&md_ctx);
if (keyresource == -1) {
EVP_PKEY_free(pkey);