cseiler         Wed Mar 25 23:59:45 2009 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/main       output.c 
  Log:
  - Fixed memory leak in ob_get_clean/ob_get_flush.
  # Not necessary in HEAD because output buffering was completely rewritten
  # there.
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/output.c?r1=1.167.2.3.2.4.2.12&r2=1.167.2.3.2.4.2.13&diff_format=u
Index: php-src/main/output.c
diff -u php-src/main/output.c:1.167.2.3.2.4.2.12 
php-src/main/output.c:1.167.2.3.2.4.2.13
--- php-src/main/output.c:1.167.2.3.2.4.2.12    Fri Feb 13 11:48:17 2009
+++ php-src/main/output.c       Wed Mar 25 23:59:45 2009
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: output.c,v 1.167.2.3.2.4.2.12 2009/02/13 11:48:17 davidc Exp $ */
+/* $Id: output.c,v 1.167.2.3.2.4.2.13 2009/03/25 23:59:45 cseiler Exp $ */
 
 #include "php.h"
 #include "ext/standard/head.h"
@@ -867,10 +867,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 */
@@ -892,10 +894,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