From 4de1e20fbb6ba108214c8501db943b5e7832b7d2 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 14 Feb 2008 08:46:25 +0000 Subject: [PATCH] Fixed memory leak --- ext/standard/array.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/standard/array.c b/ext/standard/array.c index a8cea5483a..f13aef92c6 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -1911,6 +1911,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; -- 2.50.1