From 70b2fca220fc27a16cc9f81f6c6da0f2a6d6d610 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 22 Aug 2018 13:32:55 +0200 Subject: Fix #76778: array_reduce leaks memory if callback throws exception We have to release the result variable in the error case, too. --- ext/standard/tests/array/bug76778.phpt | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 ext/standard/tests/array/bug76778.phpt (limited to 'ext/standard/tests') diff --git a/ext/standard/tests/array/bug76778.phpt b/ext/standard/tests/array/bug76778.phpt new file mode 100644 index 0000000000..2c65497d12 --- /dev/null +++ b/ext/standard/tests/array/bug76778.phpt @@ -0,0 +1,26 @@ +--TEST-- +Bug #76778 (array_reduce leaks memory if callback throws exception) +--SKIPIF-- + +--INI-- +memory_limit=32M +--FILE-- + +===DONE=== +--EXPECT-- +===DONE=== -- cgit v1.2.1