From 8c19efdc974eb7af9dba0510baacda54dfda0700 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Fri, 19 Jul 2024 13:34:17 +0200 Subject: [PATCH] Fix GH-15023: Memory leak in Zend/zend_ini.c Closes GH-15024. --- NEWS | 1 + Zend/zend_ini.c | 1 + 2 files changed, 2 insertions(+) diff --git a/NEWS b/NEWS index ec7c542a11f..14aad73564a 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ PHP NEWS - Core: . Fixed bug GH-15020 (Memory leak in Zend/Optimizer/escape_analysis.c). (nielsdos) + . Fixed bug GH-15023 (Memory leak in Zend/zend_ini.c). (nielsdos) - Curl: . Fixed case when curl_error returns an empty string. diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c index 8ba3d7ee48f..cfa394d43e9 100644 --- a/Zend/zend_ini.c +++ b/Zend/zend_ini.c @@ -243,6 +243,7 @@ ZEND_API zend_result zend_register_ini_entries_ex(const zend_ini_entry_def *ini_ if (p->name) { zend_string_release_ex(p->name, 1); } + pefree(p, true); zend_unregister_ini_entries_ex(module_number, module_type); return FAILURE; }