iliaa Tue Jun 19 22:09:49 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/openssl openssl.c Log: Fixed a memory leak inside load_all_certs_file() http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.98.2.5.2.34&r2=1.98.2.5.2.35&diff_format=u Index: php-src/ext/openssl/openssl.c diff -u php-src/ext/openssl/openssl.c:1.98.2.5.2.34 php-src/ext/openssl/openssl.c:1.98.2.5.2.35 --- php-src/ext/openssl/openssl.c:1.98.2.5.2.34 Sat May 19 22:05:08 2007 +++ php-src/ext/openssl/openssl.c Tue Jun 19 22:09:49 2007 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: openssl.c,v 1.98.2.5.2.34 2007/05/19 22:05:08 pajoye Exp $ */ +/* $Id: openssl.c,v 1.98.2.5.2.35 2007/06/19 22:09:49 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1109,17 +1109,20 @@ } if (php_openssl_safe_mode_chk(certfile TSRMLS_CC)) { + sk_X509_free(stack); goto end; } if(!(in=BIO_new_file(certfile, "r"))) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "error opening the file, %s", certfile); + sk_X509_free(stack); goto end; } /* This loads from a file, a stack of x509/crl/pkey sets */ if(!(sk=PEM_X509_INFO_read_bio(in, NULL, NULL, NULL))) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "error reading the file, %s", certfile); + sk_X509_free(stack); goto end; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php