From 4945115b2e725a60fd4b042fda66c944562094f9 Mon Sep 17 00:00:00 2001 From: Stefan Fritsch Date: Mon, 5 Apr 2010 20:36:23 +0000 Subject: [PATCH] fix potential file descriptor leak with DEBUG_CGI git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@930955 13f79535-47bb-0310-9956-ffa450edef68 --- modules/generators/mod_cgi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c index ce50608243d..0d000b9b44d 100644 --- a/modules/generators/mod_cgi.c +++ b/modules/generators/mod_cgi.c @@ -411,6 +411,7 @@ static apr_status_t run_cgi_child(apr_file_t **script_out, fprintf(dbg, "Environment: \n"); for (i = 0; env[i]; ++i) fprintf(dbg, "'%s'\n", env[i]); + fclose(dbg); #endif /* Transmute ourselves into the script. @@ -480,9 +481,6 @@ static apr_status_t run_cgi_child(apr_file_t **script_out, } } } -#ifdef DEBUG_CGI - fclose(dbg); -#endif return (rc); }