You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rp...@apache.org on 2009/06/11 14:36:36 UTC

svn commit: r783742 - /httpd/httpd/trunk/modules/generators/mod_cgid.c

Author: rpluem
Date: Thu Jun 11 12:36:36 2009
New Revision: 783742

URL: http://svn.apache.org/viewvc?rev=783742&view=rev
Log:
* Close the accepted fd in the error case to avoid a file descriptor leak.

PR: 47335
Submitted by: Kornél Pál <kornelpal gmail.com>
Reviewed by: rpluem

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

Modified: httpd/httpd/trunk/modules/generators/mod_cgid.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_cgid.c?rev=783742&r1=783741&r2=783742&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/generators/mod_cgid.c (original)
+++ httpd/httpd/trunk/modules/generators/mod_cgid.c Thu Jun 11 12:36:36 2009
@@ -780,6 +780,7 @@
                          "couldn't set child process attributes: %s", r->filename);
 
             procnew->pid = 0; /* no process to clean up */
+            close(sd2);
         }
         else {
             apr_pool_userdata_set(r, ERRFN_USERDATA_KEY, apr_pool_cleanup_null, ptrans);