From: Yann Ylavic Date: Fri, 26 Jun 2015 15:10:29 +0000 (+0000) Subject: mod_proxy: follow up to r1678768. X-Git-Tag: 2.5.0-alpha~3045 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3efa9ca0027ddd5526baa38e4ac2abb378830d48;p=thirdparty%2Fapache%2Fhttpd.git mod_proxy: follow up to r1678768. The resource is not dereferenceable if connection_destructor() is called from reslist_destroy(). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1687783 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 8d93c74774e..e9e083a1dcb 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -1489,10 +1489,11 @@ static apr_status_t connection_constructor(void **resource, void *params, static apr_status_t connection_destructor(void *resource, void *params, apr_pool_t *pool) { - proxy_conn_rec *conn = (proxy_conn_rec *)resource; + proxy_worker *worker = params; /* Destroy the pool only if not called from reslist_destroy */ - if (conn->worker->cp->pool) { + if (worker->cp->pool) { + proxy_conn_rec *conn = resource; apr_pool_destroy(conn->pool); }