]> granicus.if.org Git - php/commitdiff
fix micro-memleaks (happened once per process)
authorAntony Dovgal <tony2001@php.net>
Tue, 8 Jun 2010 12:02:55 +0000 (12:02 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 8 Jun 2010 12:02:55 +0000 (12:02 +0000)
sapi/cgi/cgi_main.c
sapi/fpm/fpm/fpm_main.c

index 4c7d020a502cce516b68ae35f93fb999e2f66c9b..da8fed108f41c00ee75c55d33414a5cbf17fac3f 100644 (file)
@@ -1879,6 +1879,7 @@ consult the installation file that came with this distribution, or visit \n\
                                                        }
                                                        php_print_info(0xFFFFFFFF TSRMLS_CC);
                                                        php_request_shutdown((void *) 0);
+                                                       fcgi_shutdown();
                                                        exit_status = 0;
                                                        goto out;
 
@@ -1900,6 +1901,7 @@ consult the installation file that came with this distribution, or visit \n\
                                                        print_extensions(TSRMLS_C);
                                                        php_printf("\n");
                                                        php_end_ob_buffers(1 TSRMLS_CC);
+                                                       fcgi_shutdown();
                                                        exit_status = 0;
                                                        goto out;
 
@@ -1933,6 +1935,7 @@ consult the installation file that came with this distribution, or visit \n\
                                                        php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2010 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
 #endif
                                                        php_request_shutdown((void *) 0);
+                                                       fcgi_shutdown();
                                                        exit_status = 0;
                                                        goto out;
 
index f02f93b0e6ea8a7b58f28f7c5774ba0267523bc7..2ee4539b2aa660a1006b37111b724fc22583f0bc 100644 (file)
@@ -1638,6 +1638,7 @@ int main(int argc, char *argv[])
                                print_extensions(TSRMLS_C);
                                php_printf("\n");
                                php_end_ob_buffers(1 TSRMLS_CC);
+                               fcgi_shutdown();
                                exit_status = 0;
                                goto out;
 
@@ -1653,6 +1654,7 @@ int main(int argc, char *argv[])
                                SG(request_info).no_headers = 1;
                                php_print_info(0xFFFFFFFF TSRMLS_CC);
                                php_request_shutdown((void *) 0);
+                               fcgi_shutdown();
                                exit_status = 0;
                                goto out;
 
@@ -1665,6 +1667,7 @@ int main(int argc, char *argv[])
                                SG(headers_sent) = 1;
                                php_cgi_usage(argv[0]);
                                php_end_ob_buffers(1 TSRMLS_CC);
+                               fcgi_shutdown();
                                exit_status = 0;
                                goto out;
 
@@ -1684,6 +1687,7 @@ int main(int argc, char *argv[])
                                php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2009 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__,      get_zend_version());
 #endif
                                php_request_shutdown((void *) 0);
+                               fcgi_shutdown();
                                exit_status = 0;
                                goto out;
                }
@@ -1698,6 +1702,7 @@ int main(int argc, char *argv[])
                php_cgi_usage(argv[0]);
                php_end_ob_buffers(1 TSRMLS_CC);
                exit_status = 0;
+               fcgi_shutdown();
                goto out;
        }