Skip to content

Commit

Permalink
Fix potential environment variable deadlock
Browse files Browse the repository at this point in the history
We have to unlock the environment before bailing out.
  • Loading branch information
cmb69 committed Jun 24, 2020
1 parent 26aefb7 commit 32257ac
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ext/standard/basic_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -4234,6 +4234,7 @@ PHP_FUNCTION(putenv)
}
/* valw may be NULL, but the failed conversion still needs to be checked. */
if (!keyw || !valw && value) {
tsrm_env_unlock();
efree(pe.putenv_string);
efree(pe.key);
free(keyw);
Expand Down

0 comments on commit 32257ac

Please sign in to comment.