cseiler         Thu Mar 26 00:00:18 2009 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src    NEWS 
    /php-src/main       output.c 
  Log:
  MFB: Fixed memory leak in ob_get_clean/ob_get_flush.
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1449&r2=1.2027.2.547.2.1450&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1449 php-src/NEWS:1.2027.2.547.2.1450
--- php-src/NEWS:1.2027.2.547.2.1449    Wed Mar 25 18:53:04 2009
+++ php-src/NEWS        Thu Mar 26 00:00:18 2009
@@ -5,6 +5,7 @@
   and CURLPROTO_* for redirect fixes in CURL 7.19.4. (Yoram Bar Haim, Stas)
 
 - Fixed memory corruptions while reading properties of zip files. (Ilia)
+- Fixed memory leak in ob_get_clean/ob_get_flush. (Christian)
 
 - Fixed bug #47772 (FILTER_VALIDATE_EMAIL allows f...@bar. addresses). (Ilia)
 - Fixed bug #47721 (Alignment issues in mbstring and sysvshm extension)
http://cvs.php.net/viewvc.cgi/php-src/main/output.c?r1=1.167.2.3.2.8&r2=1.167.2.3.2.9&diff_format=u
Index: php-src/main/output.c
diff -u php-src/main/output.c:1.167.2.3.2.8 php-src/main/output.c:1.167.2.3.2.9
--- php-src/main/output.c:1.167.2.3.2.8 Wed Dec 31 11:17:47 2008
+++ php-src/main/output.c       Thu Mar 26 00:00:18 2009
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: output.c,v 1.167.2.3.2.8 2008/12/31 11:17:47 sebastian Exp $ */
+/* $Id: output.c,v 1.167.2.3.2.9 2009/03/26 00:00:18 cseiler Exp $ */
 
 #include "php.h"
 #include "ext/standard/head.h"
@@ -855,10 +855,12 @@
        /* error checks */
        if (!OG(ob_nesting_level)) {
                php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed 
to delete and flush buffer. No buffer to delete or flush.");
+               zval_dtor(return_value);
                RETURN_FALSE;
        }
        if (OG(ob_nesting_level) && !OG(active_ob_buffer).status && 
!OG(active_ob_buffer).erase) {
                php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed 
to delete buffer %s.", OG(active_ob_buffer).handler_name);
+               zval_dtor(return_value);
                RETURN_FALSE;
        }
        /* flush */
@@ -880,10 +882,12 @@
        /* error checks */
        if (!OG(ob_nesting_level)) {
                php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed 
to delete buffer. No buffer to delete.");
+               zval_dtor(return_value);
                RETURN_FALSE;
        }
        if (OG(ob_nesting_level) && !OG(active_ob_buffer).status && 
!OG(active_ob_buffer).erase) {
                php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed 
to delete buffer %s.", OG(active_ob_buffer).handler_name);
+               zval_dtor(return_value);
                RETURN_FALSE;
        }
        /* delete buffer */



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

Reply via email to