cvs: php-src(PHP_5_3) /ext/openssl openssl.c
| From: | Rob Richards | Date: | Tue, 15 Jan 2008 15:12:47 +0000 |
| Subject: | cvs: php-src(PHP_5_3) /ext/openssl openssl.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-47849@lists.php.net to get a copy of this message | ||
rrichards Tue Jan 15 15:12:47 2008 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/openssl openssl.c
Log:
MFH: fix memleak in sign and verify functions
http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.98.2.5.2.41.2.5&r2=1.98.2.5.2.41.2.6&diff_format=u
Index: php-src/ext/openssl/openssl.c
diff -u php-src/ext/openssl/openssl.c:1.98.2.5.2.41.2.5
php-src/ext/openssl/openssl.c:1.98.2.5.2.41.2.6
--- php-src/ext/openssl/openssl.c:1.98.2.5.2.41.2.5 Wed Jan 9 16:47:25 2008
+++ php-src/ext/openssl/openssl.c Tue Jan 15 15:12:47 2008
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: openssl.c,v 1.98.2.5.2.41.2.5 2008/01/09 16:47:25 rrichards Exp $ */
+/* $Id: openssl.c,v 1.98.2.5.2.41.2.6 2008/01/15 15:12:47 rrichards Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -3716,6 +3716,7 @@
efree(sigbuf);
RETVAL_FALSE;
}
+ EVP_MD_CTX_cleanup(&md_ctx);
if (keyresource == -1) {
EVP_PKEY_free(pkey);
}
@@ -3766,6 +3767,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);