Commit 32e091260ae for php.net
commit 32e091260aeb6192caa760e8cf87837f63d1c66a
Author: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun Apr 20 22:57:58 2025 +0200
Fix GH-17403: Potential deadlock when putenv fails
Closes GH-18368.
diff --git a/NEWS b/NEWS
index bf57077f454..409972a1fe9 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,9 @@ PHP NEWS
inaccurate sunrise and sunset times, but other calculated times are
correct) (JiriJozif).
+- Standard:
+ . Fixed bug GH-17403 (Potential deadlock when putenv fails). (nielsdos)
+
08 May 2025, PHP 8.3.21
- Core:
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 99d92af167f..d2a99fccc95 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -849,6 +849,7 @@ PHP_FUNCTION(putenv)
#endif
RETURN_TRUE;
} else {
+ tsrm_env_unlock();
free(pe.putenv_string);
zend_string_release(pe.key);
#ifdef PHP_WIN32