diff options
author | Anil Madhavapeddy <avsm@php.net> | 2001-04-02 16:45:27 +0000 |
---|---|---|
committer | Anil Madhavapeddy <avsm@php.net> | 2001-04-02 16:45:27 +0000 |
commit | d26ec12ba2926764da620be995a72022067b29b6 (patch) | |
tree | e656c6f8a3b83404b2605179f8c59125a7625439 /ext/standard/output.c | |
parent | e52ec10341b06302b55728d901f9515f31c4a870 (diff) | |
download | php-git-d26ec12ba2926764da620be995a72022067b29b6.tar.gz |
Free the correct output buffer, to avoid a segfault on a HEAD request
when using output buffering with a custom handler (patch by zeev@)
Diffstat (limited to 'ext/standard/output.c')
-rw-r--r-- | ext/standard/output.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/standard/output.c b/ext/standard/output.c index dd9199cc7f..aa2b434450 100644 --- a/ext/standard/output.c +++ b/ext/standard/output.c @@ -214,6 +214,7 @@ PHPAPI void php_end_ob_buffer(zend_bool send_buffer, zend_bool just_flush) zend_stack_destroy(&OG(ob_buffers)); } } + OG(nesting_level)--; } if (send_buffer) { @@ -226,8 +227,6 @@ PHPAPI void php_end_ob_buffer(zend_bool send_buffer, zend_bool just_flush) if (!just_flush) { efree(to_be_destroyed_buffer); - - OG(nesting_level)--; } else { OG(active_ob_buffer).text_length = 0; OG(active_ob_buffer).status |= PHP_OUTPUT_HANDLER_START; |