diff options
author | Moriyoshi Koizumi <moriyoshi@php.net> | 2003-04-03 00:51:14 +0000 |
---|---|---|
committer | Moriyoshi Koizumi <moriyoshi@php.net> | 2003-04-03 00:51:14 +0000 |
commit | 485c71abf77fe852fc312d0d84b63e58df10e66a (patch) | |
tree | bacc9e470928b5c1b65821cdfbea8f05fc8b6627 | |
parent | c8948bf677cc7221d789bd9f9eb9887469307d0e (diff) | |
download | php-git-485c71abf77fe852fc312d0d84b63e58df10e66a.tar.gz |
MFH(r-1.152): fixed memleak in output buffering facility
-rw-r--r-- | main/output.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/main/output.c b/main/output.c index 72b509cb58..2c7571bdc0 100644 --- a/main/output.c +++ b/main/output.c @@ -483,10 +483,10 @@ static int php_ob_init(uint initial_size, uint block_size, zval *output_handler, /* do we have array(object,method) */ if (zend_is_callable(output_handler, 1, &handler_name)) { SEPARATE_ZVAL(&output_handler); - output_handler->refcount++; result = php_ob_init_named(initial_size, block_size, handler_name, output_handler, chunk_size, erase TSRMLS_CC); efree(handler_name); } else { + efree(handler_name); /* init all array elements recursively */ zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(output_handler), &pos); while (zend_hash_get_current_data_ex(Z_ARRVAL_P(output_handler), (void **)&tmp, &pos) == SUCCESS) { @@ -500,7 +500,6 @@ static int php_ob_init(uint initial_size, uint block_size, zval *output_handler, } else { if (output_handler) { SEPARATE_ZVAL(&output_handler); - output_handler->refcount++; } result = php_ob_init_named(initial_size, block_size, OB_DEFAULT_HANDLER_NAME, output_handler, chunk_size, erase TSRMLS_CC); } |