From: Sascha Schumann Date: Sat, 4 May 2002 19:06:46 +0000 (+0000) Subject: Free string before overwriting it X-Git-Tag: php-4.3.0dev-ZendEngine2-Preview1~232 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=707b8b019e3236e8388d1e3b440a28cd22b0c581;p=php Free string before overwriting it --- diff --git a/main/output.c b/main/output.c index c8d414910a..24b985ba6c 100644 --- a/main/output.c +++ b/main/output.c @@ -324,8 +324,10 @@ PHPAPI void php_ob_set_internal_handler(php_output_handler_func_t internal_outpu OG(active_ob_buffer).internal_output_handler = internal_output_handler; OG(active_ob_buffer).internal_output_handler_buffer = (char *) emalloc(buffer_size); OG(active_ob_buffer).internal_output_handler_buffer_size = buffer_size; + if (OG(active_ob_buffer).handler_name) + efree(OG(active_ob_buffer).handler_name); OG(active_ob_buffer).handler_name = handler_name; - OG(active_ob_buffer).erase = erase; + OG(active_ob_buffer).erase = erase; } /* }}} */