From: Dmitry Stogov Date: Thu, 14 Feb 2008 08:46:42 +0000 (+0000) Subject: Fixed memory leak X-Git-Tag: RELEASE_2_0_0a1~483 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7412aae87374f1d2ae5d928753872af0424c64fb;p=php Fixed memory leak --- diff --git a/ext/standard/array.c b/ext/standard/array.c index 69a552d8b5..f182600e2c 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -2092,6 +2092,7 @@ PHP_FUNCTION(array_push) Z_ADDREF_P(new_var); if (zend_hash_next_index_insert(Z_ARRVAL_P(stack), &new_var, sizeof(zval *), NULL) == FAILURE) { + Z_DELREF_P(new_var); php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot add element to the array as the next element is already occupied"); efree(args); RETURN_FALSE;