pajoye Fri, 09 Oct 2009 19:13:33 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=289444
Log:
- Merge: fix leak
Changed paths:
U php/php-src/branches/PHP_5_3_1/main/output.c
Modified: php/php-src/branches/PHP_5_3_1/main/output.c
===================================================================
--- php/php-src/branches/PHP_5_3_1/main/output.c 2009-10-09 19:08:56 UTC
(rev 289443)
+++ php/php-src/branches/PHP_5_3_1/main/output.c 2009-10-09 19:13:33 UTC
(rev 289444)
@@ -227,8 +227,6 @@
ALLOC_INIT_ZVAL(orig_buffer);
ZVAL_STRINGL(orig_buffer, OG(active_ob_buffer).buffer,
OG(active_ob_buffer).text_length, 1);
- Z_SET_REFCOUNT_P(orig_buffer, 2); /* don't let
call_user_function() destroy our buffer */
- Z_SET_ISREF_P(orig_buffer);
ALLOC_INIT_ZVAL(z_status);
ZVAL_LONG(z_status, status);
@@ -248,11 +246,7 @@
if (!just_flush) {
zval_ptr_dtor(&OG(active_ob_buffer).output_handler);
}
- Z_SET_REFCOUNT_P(orig_buffer, Z_REFCOUNT_P(orig_buffer) - 2);
- if (Z_REFCOUNT_P(orig_buffer) <= 0) { /* free the zval */
- zval_dtor(orig_buffer);
- FREE_ZVAL(orig_buffer);
- }
+ zval_ptr_dtor(&orig_buffer);
zval_ptr_dtor(&z_status);
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php