From: Ruediger Pluem Date: Thu, 11 Jun 2009 12:36:36 +0000 (+0000) Subject: * Close the accepted fd in the error case to avoid a file descriptor leak. X-Git-Tag: 2.3.3~517 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=40c818801c0c0bd98fc845a5be2bb31c078251b5;p=thirdparty%2Fapache%2Fhttpd.git * Close the accepted fd in the error case to avoid a file descriptor leak. PR: 47335 Submitted by: Kornél Pál Reviewed by: rpluem git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@783742 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c index 8a305111839..f124e81982f 100644 --- a/modules/generators/mod_cgid.c +++ b/modules/generators/mod_cgid.c @@ -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);