From ae828233feb1e0d90c722c33fecb3fb6f4a21578 Mon Sep 17 00:00:00 2001 From: Yasuo Ohgaki Date: Sat, 4 May 2002 10:55:08 +0000 Subject: [PATCH] Forgot to dup strings. --- main/output.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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; } -- 2.50.1