pajoye          Wed Jun 20 05:27:38 2007 UTC

  Modified files:              
    /php-src/ext/openssl        openssl.c 
  Log:
  - MFB:  Fixed a memory leak inside load_all_certs_file()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.140&r2=1.141&diff_format=u
Index: php-src/ext/openssl/openssl.c
diff -u php-src/ext/openssl/openssl.c:1.140 php-src/ext/openssl/openssl.c:1.141
--- php-src/ext/openssl/openssl.c:1.140 Mon May 28 23:33:13 2007
+++ php-src/ext/openssl/openssl.c       Wed Jun 20 05:27:38 2007
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: openssl.c,v 1.140 2007/05/28 23:33:13 iliaa Exp $ */
+/* $Id: openssl.c,v 1.141 2007/06/20 05:27:38 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1095,17 +1095,20 @@
        }
 
        if (php_check_open_basedir(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

Reply via email to