From ab7b44808268f52da78914aeea1f649328028123 Mon Sep 17 00:00:00 2001 From: Stefan Fritsch Date: Sun, 20 Nov 2011 16:41:42 +0000 Subject: [PATCH] Fix segfault caused by r1204104 on non-async mpms. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204180 13f79535-47bb-0310-9956-ffa450edef68 --- include/httpd.h | 2 +- modules/http/http_core.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/httpd.h b/include/httpd.h index 7c347c1497..39d10e1c4c 100644 --- a/include/httpd.h +++ b/include/httpd.h @@ -1080,7 +1080,7 @@ struct conn_rec { void *sbh; /** The bucket allocator to use for all bucket/brigade creations */ struct apr_bucket_alloc_t *bucket_alloc; - /** The current state of this connection */ + /** The current state of this connection; may be NULL if not used by MPM */ conn_state_t *cs; /** Is there data pending in the input filters? */ int data_in_input_filters; diff --git a/modules/http/http_core.c b/modules/http/http_core.c index 8421f42b97..663810a526 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -185,7 +185,8 @@ static int ap_process_http_sync_connection(conn_rec *c) ap_update_child_status(c->sbh, SERVER_BUSY_WRITE, r); if (r->status == HTTP_OK) { - cs->state = CONN_STATE_HANDLER; + if (cs) + cs->state = CONN_STATE_HANDLER; ap_process_request(r); /* After the call to ap_process_request, the * request pool will have been deleted. We set -- 2.40.0