summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}
}