]> granicus.if.org Git - php/commitdiff
- Fixed memleak when depth arg is less than zero
authorFelipe Pena <felipe@php.net>
Wed, 24 Jun 2009 17:39:36 +0000 (17:39 +0000)
committerFelipe Pena <felipe@php.net>
Wed, 24 Jun 2009 17:39:36 +0000 (17:39 +0000)
ext/json/json.c

index 841ce25e5563128747b9b9eb1b0939071ea2b7c6..b8d30e75b3b698b7e4cc4a8a34040fda7903aa75 100644 (file)
@@ -544,6 +544,7 @@ static PHP_FUNCTION(json_decode)
 
        if (depth <= 0) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Depth must greater than zero");
+               efree(utf16);
                RETURN_NULL();
        }