httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r930955 - /httpd/httpd/trunk/modules/generators/mod_cgi.c
Date Mon, 05 Apr 2010 20:36:23 GMT
Author: sf
Date: Mon Apr  5 20:36:23 2010
New Revision: 930955

URL: http://svn.apache.org/viewvc?rev=930955&view=rev
Log:
fix potential file descriptor leak with DEBUG_CGI

Modified:
    httpd/httpd/trunk/modules/generators/mod_cgi.c

Modified: httpd/httpd/trunk/modules/generators/mod_cgi.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_cgi.c?rev=930955&r1=930954&r2=930955&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/generators/mod_cgi.c (original)
+++ httpd/httpd/trunk/modules/generators/mod_cgi.c Mon Apr  5 20:36:23 2010
@@ -411,6 +411,7 @@ static apr_status_t run_cgi_child(apr_fi
     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_fi
             }
         }
     }
-#ifdef DEBUG_CGI
-    fclose(dbg);
-#endif
     return (rc);
 }
 



Mime
View raw message