summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2018-10-03 14:36:09 +0200
committerAnatol Belski <ab@php.net>2018-10-03 14:36:09 +0200
commit1c11fc7f135fbcba7172acae28284d1a873b2bc7 (patch)
treeee4f617b063cef0cf382e28f25dd804dc9c4661c
parentd604f65de5f5f94f09e983f3274be372894b7054 (diff)
parent8400f73f8dd7839910a6c823e795f7694a5cc6c1 (diff)
downloadphp-git-1c11fc7f135fbcba7172acae28284d1a873b2bc7.tar.gz
Merge branch 'PHP-7.3'
* PHP-7.3: Avoid code duplication and don't miss env restore
-rw-r--r--sapi/cgi/cgi_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index ddef5e25f7..98981c0ae3 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -2191,8 +2191,7 @@ consult the installation file that came with this distribution, or visit \n\
while (parent) {
EnterCriticalSection(&cleanup_lock);
if (cleaning_up) {
- DeleteCriticalSection(&cleanup_lock);
- goto parent_out;
+ goto parent_loop_end;
}
LeaveCriticalSection(&cleanup_lock);
@@ -2249,7 +2248,8 @@ consult the installation file that came with this distribution, or visit \n\
WaitForMultipleObjects(kids, kid_cgi_ps, FALSE, INFINITE);
}
-
+
+parent_loop_end:
/* restore my env */
SetEnvironmentVariable("PHP_FCGI_CHILDREN", kid_buf);