diff --git a/ext/json/json.c b/ext/json/json.c index 43902a8cb52..5edacc32624 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(); }