]> granicus.if.org Git - php/commit
Fix #76778: array_reduce leaks memory if callback throws exception
authorChristoph M. Becker <cmbecker69@gmx.de>
Wed, 22 Aug 2018 11:32:55 +0000 (13:32 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Wed, 22 Aug 2018 11:40:24 +0000 (13:40 +0200)
commit70b2fca220fc27a16cc9f81f6c6da0f2a6d6d610
tree1993d664aedeed667555d6089a7eee4450933dc2
parentcf2fc66b0289dc7a34a0d9c0e67bccb8e97472bd
Fix #76778: array_reduce leaks memory if callback throws exception

We have to release the result variable in the error case, too.
NEWS
ext/standard/array.c
ext/standard/tests/array/bug76778.phpt [new file with mode: 0644]