fix segfault when retval_ptr is empty - such as when exception thrown

This commit is contained in:
Rob Richards 2005-02-10 22:59:26 +00:00
parent 2c6b600a90
commit bb9ba8e36e

View File

@ -1084,7 +1084,9 @@ static int php_array_walk(HashTable *target_hash, zval **userdata, int recursive
/* Call the userland function */
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 {
char *func_name;