From: Brian Pane Date: Sun, 13 Jan 2002 02:35:56 +0000 (+0000) Subject: Clear the output socket descriptor in unixd_accept() to make sure X-Git-Tag: 2.0.31~207 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d5dbe606e3bea07a976d08e1856a91830528d5b4;p=apache Clear the output socket descriptor in unixd_accept() to make sure we don't supply a bogus socket to the caller if the accept fails. (This was causing problems in the worker MPM, which tried to process the returned socket if it was non-NULL, even if unixd_accept() returned an error.) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92837 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/os/unix/unixd.c b/os/unix/unixd.c index bdd760b9a9..e023c3864e 100644 --- a/os/unix/unixd.c +++ b/os/unix/unixd.c @@ -449,6 +449,7 @@ AP_DECLARE(apr_status_t) unixd_accept(void **accepted, ap_listen_rec *lr, apr_status_t status; int sockdes; + *accepted = NULL; status = apr_accept(&csd, lr->sd, ptrans); if (status == APR_SUCCESS) { *accepted = csd;