Skip to content

Commit fcdb610

Browse files
committed
Fix double free in array_reduce
return_value needs to be explicitly nulled out in the failure case.
1 parent 5217666 commit fcdb610

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/standard/array.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6057,7 +6057,7 @@ PHP_FUNCTION(array_reduce)
60576057
} else {
60586058
zval_ptr_dtor(&args[1]);
60596059
zval_ptr_dtor(&args[0]);
6060-
return;
6060+
RETURN_NULL();
60616061
}
60626062
} ZEND_HASH_FOREACH_END();
60636063

0 commit comments

Comments
 (0)