Fixed memory leak

This commit is contained in:
Dmitry Stogov 2008-02-14 08:46:42 +00:00
parent 196af88af8
commit 7412aae873

View File

@ -2092,6 +2092,7 @@ PHP_FUNCTION(array_push)
Z_ADDREF_P(new_var); Z_ADDREF_P(new_var);
if (zend_hash_next_index_insert(Z_ARRVAL_P(stack), &new_var, sizeof(zval *), NULL) == FAILURE) { 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"); php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot add element to the array as the next element is already occupied");
efree(args); efree(args);
RETURN_FALSE; RETURN_FALSE;