]> granicus.if.org Git - php/commitdiff
Fix leaks in cgi strip/highlight mode
authorNikita Popov <nikita.ppv@gmail.com>
Thu, 25 Jun 2020 14:06:20 +0000 (16:06 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 25 Jun 2020 14:06:33 +0000 (16:06 +0200)
sapi/cgi/cgi_main.c

index 0dfcdb84ef5fa1b68d3539b3acae37163c5c8b46..9a64e0f903d5a3c03c061656bc0dd88fd3780f9a 100644 (file)
@@ -2569,10 +2569,8 @@ parent_loop_end:
                                        if (open_file_for_scanning(&file_handle) == SUCCESS) {
                                                zend_strip();
                                                zend_file_handle_dtor(&file_handle);
-                                               php_output_teardown();
                                        }
-                                       return SUCCESS;
-                                       break;
+                                       goto parent_out;
                                case PHP_MODE_HIGHLIGHT:
                                        {
                                                zend_syntax_highlighter_ini syntax_highlighter_ini;
@@ -2584,9 +2582,8 @@ parent_loop_end:
                                                                goto fastcgi_request_done;
                                                        }
                                                        zend_file_handle_dtor(&file_handle);
-                                                       php_output_teardown();
                                                }
-                                               return SUCCESS;
+                                               goto parent_out;
                                        }
                                        break;
                        }