Skip to content

Commit a1c6a7a

Browse files
committed
Fix leaks in cgi strip/highlight mode
1 parent 785497c commit a1c6a7a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

sapi/cgi/cgi_main.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2569,10 +2569,8 @@ consult the installation file that came with this distribution, or visit \n\
25692569
if (open_file_for_scanning(&file_handle) == SUCCESS) {
25702570
zend_strip();
25712571
zend_file_handle_dtor(&file_handle);
2572-
php_output_teardown();
25732572
}
2574-
return SUCCESS;
2575-
break;
2573+
goto parent_out;
25762574
case PHP_MODE_HIGHLIGHT:
25772575
{
25782576
zend_syntax_highlighter_ini syntax_highlighter_ini;
@@ -2584,9 +2582,8 @@ consult the installation file that came with this distribution, or visit \n\
25842582
goto fastcgi_request_done;
25852583
}
25862584
zend_file_handle_dtor(&file_handle);
2587-
php_output_teardown();
25882585
}
2589-
return SUCCESS;
2586+
goto parent_out;
25902587
}
25912588
break;
25922589
}

0 commit comments

Comments
 (0)