mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
fix segfault when retval_ptr is empty - such as when exception thrown
This commit is contained in:
parent
2c6b600a90
commit
bb9ba8e36e
1 changed files with 3 additions and 1 deletions
|
@ -1084,7 +1084,9 @@ static int php_array_walk(HashTable *target_hash, zval **userdata, int recursive
|
||||||
|
|
||||||
/* Call the userland function */
|
/* Call the userland function */
|
||||||
if (zend_call_function(&fci, &BG(array_walk_fci_cache) TSRMLS_CC) == SUCCESS) {
|
if (zend_call_function(&fci, &BG(array_walk_fci_cache) TSRMLS_CC) == SUCCESS) {
|
||||||
zval_ptr_dtor(&retval_ptr);
|
if (retval_ptr) {
|
||||||
|
zval_ptr_dtor(&retval_ptr);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
char *func_name;
|
char *func_name;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue