Skip to content

Commit

Permalink
fix potential file descriptor leak with DEBUG_CGI
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@930955 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Stefan Fritsch committed Apr 5, 2010
1 parent 71e4d2a commit 4945115
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions modules/generators/mod_cgi.c
Expand Up @@ -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.
Expand Down Expand Up @@ -480,9 +481,6 @@ static apr_status_t run_cgi_child(apr_file_t **script_out,
}
}
}
#ifdef DEBUG_CGI
fclose(dbg);
#endif
return (rc);
}

Expand Down

0 comments on commit 4945115

Please sign in to comment.