summaryrefslogtreecommitdiff
path: root/ext/json/json.c
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2009-06-24 17:39:52 +0000
committerFelipe Pena <felipe@php.net>2009-06-24 17:39:52 +0000
commitcaf8d811efa895a75ff050ad7dd9b3ae3354fd35 (patch)
treedf827fc5ea77214dca327a447d50908957d484ff /ext/json/json.c
parentc0aa23fd866bd736bde69613eda17802c3543064 (diff)
downloadphp-git-caf8d811efa895a75ff050ad7dd9b3ae3354fd35.tar.gz
- MFH: Fixed memleak when depth arg is less than zero
Diffstat (limited to 'ext/json/json.c')
-rw-r--r--ext/json/json.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/json/json.c b/ext/json/json.c
index c335707cb3..73bb079620 100644
--- a/ext/json/json.c
+++ b/ext/json/json.c
@@ -486,6 +486,7 @@ PHPAPI void php_json_decode(zval *return_value, char *str, int str_len, zend_boo
if (depth <= 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Depth must greater than zero");
+ efree(utf16);
RETURN_NULL();
}