mirror of
https://github.com/php/php-src.git
synced 2025-01-12 14:04:45 +08:00
Fixed memory leak
This commit is contained in:
parent
e6e162bc8e
commit
4de1e20fbb
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user