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);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to