[php-src] master: session: fix corruption in mod_mm

ndossche <[email protected]>
Newsgroups gmane.comp.php.cvs.general
Message-ID <[email protected]>
Author: ndossche (ndossche)
Date: 2026-08-05T10:23:51+02:00

Commit: https://github.com/php/php-src/commit/a0336012739b35630a32674a484a7023433bde27
Raw diff: https://github.com/php/php-src/commit/a0336012739b35630a32674a484a7023433bde27.diff

session: fix corruption in mod_mm

Changed paths:
  M  ext/session/mod_mm.c


Diff:

diff --git a/ext/session/mod_mm.c b/ext/session/mod_mm.c
index b997a2bdcff5..75ee713e9f09 100644
--- a/ext/session/mod_mm.c
+++ b/ext/session/mod_mm.c
@@ -351,7 +351,7 @@ PS_READ_FUNC(mm)
 		&& ps_mm_key_exists(data, key) == FAILURE) {
 		/* key points to PS(id), but cannot change here. */
 		if (key) {
-			efree(PS(id));
+			zend_string_release_ex(PS(id), false);
 			PS(id) = NULL;
 		}
 		PS(id) = PS(mod)->s_create_sid((void **)&data);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.