summaryrefslogtreecommitdiff
path: root/main/output.c
diff options
context:
space:
mode:
authorChristian Seiler <cseiler@php.net>2009-03-25 23:59:45 +0000
committerChristian Seiler <cseiler@php.net>2009-03-25 23:59:45 +0000
commit3470a301254c1e3201d580c1d9207e7f66b58f10 (patch)
treeb043c97ce3197f0a0c304806e259e97d421a8d6d /main/output.c
parent19b88b6163e412abf5648db4adbe7da802ffa0b0 (diff)
downloadphp-git-3470a301254c1e3201d580c1d9207e7f66b58f10.tar.gz
- Fixed memory leak in ob_get_clean/ob_get_flush.
# Not necessary in HEAD because output buffering was completely rewritten # there.
Diffstat (limited to 'main/output.c')
-rw-r--r--main/output.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/output.c b/main/output.c
index 24e879febe..dff4959972 100644
--- a/main/output.c
+++ b/main/output.c
@@ -867,10 +867,12 @@ PHP_FUNCTION(ob_get_flush)
/* error checks */
if (!OG(ob_nesting_level)) {
php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete and flush buffer. No buffer to delete or flush.");
+ zval_dtor(return_value);
RETURN_FALSE;
}
if (OG(ob_nesting_level) && !OG(active_ob_buffer).status && !OG(active_ob_buffer).erase) {
php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer %s.", OG(active_ob_buffer).handler_name);
+ zval_dtor(return_value);
RETURN_FALSE;
}
/* flush */
@@ -892,10 +894,12 @@ PHP_FUNCTION(ob_get_clean)
/* error checks */
if (!OG(ob_nesting_level)) {
php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer. No buffer to delete.");
+ zval_dtor(return_value);
RETURN_FALSE;
}
if (OG(ob_nesting_level) && !OG(active_ob_buffer).status && !OG(active_ob_buffer).erase) {
php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer %s.", OG(active_ob_buffer).handler_name);
+ zval_dtor(return_value);
RETURN_FALSE;
}
/* delete buffer */