diff options
author | Christophe Jaillet <jailletc36@apache.org> | 2019-04-24 22:22:54 +0200 |
---|---|---|
committer | Christophe Jaillet <jailletc36@apache.org> | 2019-04-24 22:22:54 +0200 |
commit | 37b3fc7921d2b2db91ca5675ab91881a25fb777d (patch) | |
tree | 81cd94fb3b063c27d12acc1b63feec2b32106174 /modules/http | |
parent | Fix a compilation error when GPROF is defined. (diff) | |
download | apache2-37b3fc7921d2b2db91ca5675ab91881a25fb777d.tar.xz apache2-37b3fc7921d2b2db91ca5675ab91881a25fb777d.zip |
revert r1857857.
The comment is useful and the dead-code is future proof (and should be axed by the compiler anyway)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1858070 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/http')
-rw-r--r-- | modules/http/http_core.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/http/http_core.c b/modules/http/http_core.c index a241783673..746cf704a7 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -57,6 +57,7 @@ static const char *set_keep_alive_timeout(cmd_parms *cmd, void *dummy, 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_connection(conn_rec *c) } 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 && |