From df5551ba4f1aae8486b3c4011318188fde7e30cd Mon Sep 17 00:00:00 2001 From: Matteo Beccati Date: Fri, 13 Jun 2014 13:14:12 +0200 Subject: [PATCH] Fix bug #67433 SIGSEGV when using count() on an object implementing Countable --- NEWS | 2 ++ ext/standard/array.c | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 490ccea7a6..38a05790df 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,8 @@ PHP NEWS . Fixed bug #67392 (dtrace breaks argument unpack). (Nikita) . Fixed bug #67428 (header('Location: foo') will override a 308-399 response code). (Adam) + . Fixed bug #67433 (SIGSEGV when using count() on an object implementing + Countable). (Matteo) - CLI server: . Implemented FR #67429 (CLI server is missing some new HTTP response codes). diff --git a/ext/standard/array.c b/ext/standard/array.c index 4f98331035..cbcaaf5b8b 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -342,8 +342,7 @@ PHP_FUNCTION(count) RETVAL_LONG(Z_LVAL_P(retval)); zval_ptr_dtor(&retval); } - zval_dtor(mode_zv); - efree(mode_zv); + zval_ptr_dtor(&mode_zv); return; } #endif -- 2.50.1