Skip to content

Commit 32257ac

Browse files
committed
Fix potential environment variable deadlock
We have to unlock the environment before bailing out.
1 parent 26aefb7 commit 32257ac

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: ext/standard/basic_functions.c

+1
Original file line numberDiff line numberDiff line change
@@ -4234,6 +4234,7 @@ PHP_FUNCTION(putenv)
42344234
}
42354235
/* valw may be NULL, but the failed conversion still needs to be checked. */
42364236
if (!keyw || !valw && value) {
4237+
tsrm_env_unlock();
42374238
efree(pe.putenv_string);
42384239
efree(pe.key);
42394240
free(keyw);

0 commit comments

Comments
 (0)