]> granicus.if.org Git - apache/commitdiff
Clear the output socket descriptor in unixd_accept() to make sure
authorBrian Pane <brianp@apache.org>
Sun, 13 Jan 2002 02:35:56 +0000 (02:35 +0000)
committerBrian Pane <brianp@apache.org>
Sun, 13 Jan 2002 02:35:56 +0000 (02:35 +0000)
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

index bdd760b9a9b827763684bbd6bff74011c76ebcc7..e023c3864e9c0a4d70330a688613219b1b9e5afc 100644 (file)
@@ -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;