]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* Close the accepted fd in the error case to avoid a file descriptor leak.
authorRuediger Pluem <rpluem@apache.org>
Thu, 11 Jun 2009 12:36:36 +0000 (12:36 +0000)
committerRuediger Pluem <rpluem@apache.org>
Thu, 11 Jun 2009 12:36:36 +0000 (12:36 +0000)
PR: 47335
Submitted by: Kornél Pál <kornelpal gmail.com>
Reviewed by: rpluem

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@783742 13f79535-47bb-0310-9956-ffa450edef68

modules/generators/mod_cgid.c

index 8a305111839e46dd7051cbe0a82dd1509b2c0f8f..f124e81982f0eedfb50bcbe20b961daf9cc9ba70 100644 (file)
@@ -780,6 +780,7 @@ static int cgid_server(void *data)
                          "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);