Skip to content

Commit 044eb39

Browse files
committed
Avoid code duplication and don't miss env restore
1 parent b0547a3 commit 044eb39

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sapi/cgi/cgi_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2242,8 +2242,7 @@ consult the installation file that came with this distribution, or visit \n\
22422242
while (parent) {
22432243
EnterCriticalSection(&cleanup_lock);
22442244
if (cleaning_up) {
2245-
DeleteCriticalSection(&cleanup_lock);
2246-
goto parent_out;
2245+
goto parent_loop_end;
22472246
}
22482247
LeaveCriticalSection(&cleanup_lock);
22492248

@@ -2299,6 +2298,7 @@ consult the installation file that came with this distribution, or visit \n\
22992298
WaitForMultipleObjects(kids, kid_cgi_ps, FALSE, INFINITE);
23002299
}
23012300

2301+
parent_loop_end:
23022302
/* restore my env */
23032303
SetEnvironmentVariable("PHP_FCGI_CHILDREN", kid_buf);
23042304

0 commit comments

Comments
 (0)