From: Yasuo Ohgaki Date: Sat, 4 May 2002 10:55:08 +0000 (+0000) Subject: Forgot to dup strings. X-Git-Tag: php-4.3.0dev-ZendEngine2-Preview1~261 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ae828233feb1e0d90c722c33fecb3fb6f4a21578;p=php Forgot to dup strings. --- diff --git a/main/output.c b/main/output.c index 3b602d3798..2999227a1d 100644 --- a/main/output.c +++ b/main/output.c @@ -268,8 +268,10 @@ PHPAPI void php_end_ob_buffer(zend_bool send_buffer, zend_bool just_flush TSRMLS zval_ptr_dtor(&alternate_buffer); } - if (!just_flush) { + if (status & PHP_OUTPUT_HANDLER_END) { efree(to_be_destoryed_handler_name); + } + if (!just_flush) { efree(to_be_destroyed_buffer); } else { OG(active_ob_buffer).text_length = 0; @@ -370,10 +372,10 @@ static void php_ob_init(uint initial_size, uint block_size, zval *output_handler else if (output_handler && output_handler->type == IS_ARRAY) { /* FIXME: Array type is not supported yet. See call_user_function_ex() for detials. */ - OG(active_ob_buffer).handler_name = "array is not supported yet"; + OG(active_ob_buffer).handler_name = estrdup("array is not supported yet"); } else { - OG(active_ob_buffer).handler_name = "default output handler"; + OG(active_ob_buffer).handler_name = estrdup("default output handler"); } OG(active_ob_buffer).erase = erase; }