]> granicus.if.org Git - apache/commitdiff
mod_proxy: follow up to r1678768.
authorYann Ylavic <ylavic@apache.org>
Fri, 26 Jun 2015 15:10:29 +0000 (15:10 +0000)
committerYann Ylavic <ylavic@apache.org>
Fri, 26 Jun 2015 15:10:29 +0000 (15:10 +0000)
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

modules/proxy/proxy_util.c

index 8d93c74774e88a093d9ae128947ea255a0ec1f5e..e9e083a1dcb0236894a4cb6d7fd3d073233f20d8 100644 (file)
@@ -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);
     }