From: Greg Stein Date: Fri, 26 Jan 2001 09:05:40 +0000 (+0000) Subject: apr_put_os_file() expected the caller to have an existing file or init to X-Git-Tag: APACHE_2_0_BETA_CANDIDATE_1~91 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2cc4a60a59adef39a011bcb799ab397b896b9977;p=apache apr_put_os_file() expected the caller to have an existing file or init to NULL. using an existing file doesn't normally work: where would you get a blank file to shove an FD into? expecting the user to assign to NULL is error-prone (mod_isapi didn't). *) always create and return a new file from apr_put_os_file() *) reimplement apr_open_stderr() in terms of apr_put_os_file() [ except for win32... some issues there ] *) remove some (obsolete) inits to NULL git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87851 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c index 5377ebcd57..327477eb66 100644 --- a/modules/generators/mod_cgid.c +++ b/modules/generators/mod_cgid.c @@ -443,7 +443,7 @@ static int cgid_server(void *data) request_rec *r; apr_procattr_t *procattr = NULL; apr_proc_t *procnew = NULL; - apr_file_t *inout = NULL; + apr_file_t *inout; len = sizeof(unix_addr); @@ -743,7 +743,7 @@ static int cgid_handler(request_rec *r) int sd; char **env; struct sockaddr_un unix_addr; - apr_file_t *tempsock = NULL; + apr_file_t *tempsock; apr_size_t nbytes; if(strcmp(r->handler,CGI_MAGIC_TYPE) && strcmp(r->handler,"cgi-script"))