1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Fix GH-15986: Double-free due to Pdo\Pgsql::setNoticeCallback()

We need to release the fcall info cache instead of destroying it.

Closes GH-15987.
This commit is contained in:
Christoph M. Becker
2024-09-22 19:44:39 +02:00
parent 79d708cfca
commit 2b90acb469
2 changed files with 5 additions and 3 deletions

4
NEWS
View File

@@ -30,6 +30,10 @@ PHP NEWS
- PCRE:
. Fix UAF issues with PCRE after request shutdown. (nielsdos)
- PDO_PGSQL:
. Fixed GH-15986 (Double-free due to Pdo\Pgsql::setNoticeCallback()). (cmb,
nielsdos)
- Reflection:
. Add missing ReflectionProperty::hasHook[s]() methods. (ilutov)
. Add missing ReflectionProperty::isFinal() method. (ilutov)

View File

@@ -169,9 +169,7 @@ PHP_METHOD(Pdo_Pgsql, setNoticeCallback)
return;
cleanup:
if (ZEND_FCC_INITIALIZED(fcc)) {
zend_fcc_dtor(&fcc);
}
zend_release_fcall_info_cache(&fcc);
RETURN_THROWS();
}