summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Kalowsky <kalowsky@php.net>2002-08-13 23:12:54 +0000
committerDan Kalowsky <kalowsky@php.net>2002-08-13 23:12:54 +0000
commit19e42a2ed3176173fe25ad9f9dc3b24ca2c8ae45 (patch)
tree2c946098677a451330bb9f6eb0f5b6b1047c9721
parented135034a9798d9c120a513c7b0ce1562034fd11 (diff)
downloadphp-git-19e42a2ed3176173fe25ad9f9dc3b24ca2c8ae45.tar.gz
Fixed another memory leak, patch provided by Ilia <ilia@prohost.org>
-rw-r--r--ext/standard/pack.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/standard/pack.c b/ext/standard/pack.c
index 8c02b8573f..3d47e0609c 100644
--- a/ext/standard/pack.c
+++ b/ext/standard/pack.c
@@ -521,7 +521,7 @@ PHP_FUNCTION(unpack)
inputpos = 0;
if (array_init(return_value) == FAILURE)
- return;
+ RETURN_FALSE;
while (formatlen-- > 0) {
char type = *(format++);
@@ -812,6 +812,7 @@ PHP_FUNCTION(unpack)
break;
} else {
php_error(E_WARNING, "pack type %c: not enough input, need %d, have %d", type, size, inputlen - inputpos);
+ zval_dtor(return_value);
RETURN_FALSE;
}
}