httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaillet...@apache.org
Subject svn commit: r1858070 - /httpd/httpd/trunk/modules/http/http_core.c
Date Wed, 24 Apr 2019 20:22:54 GMT
Author: jailletc36
Date: Wed Apr 24 20:22:54 2019
New Revision: 1858070

URL: http://svn.apache.org/viewvc?rev=1858070&view=rev
Log:
revert r1857857.

The comment is useful and the dead-code is future proof (and should be axed by the compiler
anyway)

Modified:
    httpd/httpd/trunk/modules/http/http_core.c

Modified: httpd/httpd/trunk/modules/http/http_core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/http_core.c?rev=1858070&r1=1858069&r2=1858070&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http/http_core.c (original)
+++ httpd/httpd/trunk/modules/http/http_core.c Wed Apr 24 20:22:54 2019
@@ -57,6 +57,7 @@ static const char *set_keep_alive_timeou
         return err;
     }
 
+    /* Stolen from mod_proxy.c */
     if (ap_timeout_parameter_parse(arg, &timeout, "s") != APR_SUCCESS)
         return "KeepAliveTimeout has wrong format";
     cmd->server->keep_alive_timeout = timeout;
@@ -155,6 +156,14 @@ static int ap_process_http_async_connect
                 }
                 ap_update_child_status(c->sbh, SERVER_BUSY_WRITE, r);
                 ap_process_async_request(r);
+                /* After the call to ap_process_request, the
+                 * request pool may have been deleted.  We set
+                 * r=NULL here to ensure that any dereference
+                 * of r that might be added later in this function
+                 * will result in a segfault immediately instead
+                 * of nondeterministic failures later.
+                 */
+                r = NULL;
             }
 
             if (cs->state != CONN_STATE_WRITE_COMPLETION &&



Mime
View raw message