From d5dbe606e3bea07a976d08e1856a91830528d5b4 Mon Sep 17 00:00:00 2001 From: Brian Pane Date: Sun, 13 Jan 2002 02:35:56 +0000 Subject: [PATCH] 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 --- os/unix/unixd.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.40.0