From: Omar Kilani Date: Thu, 12 Jan 2006 03:50:22 +0000 (+0000) Subject: Don't leak a json_object on a decode error. X-Git-Tag: RELEASE_1_0_4~47 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a5cfcdd2769b207283645531faba5864a7fd20e5;p=php Don't leak a json_object on a decode error. --- diff --git a/ext/json/json.c b/ext/json/json.c index 43902a8cb5..5edacc3262 100644 --- a/ext/json/json.c +++ b/ext/json/json.c @@ -331,6 +331,7 @@ PHP_FUNCTION(json_decode) z = json_decode_r(jo, assoc TSRMLS_CC); if (!z) { + json_object_put(jo); RETURN_NULL(); }