From 3d4e9fbed547ad600bccedbc1d33ed8cb21a5d1b Mon Sep 17 00:00:00 2001 From: "Victor J. Orlikowski" Date: Fri, 6 Apr 2001 01:59:26 +0000 Subject: [PATCH] More pool allocation errors. The apr_sockaddr_t structures connect_addr and uri_addr were getting allocated out of the wrong pool (one of the request pools) when they were expected to stick around for the life of the socket. Further, the default pool to be used should have been the connection pool in the request_rec. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88737 13f79535-47bb-0310-9956-ffa450edef68 --- modules/proxy/proxy_http.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/proxy/proxy_http.c b/modules/proxy/proxy_http.c index 3abf583f68..4fdaede991 100644 --- a/modules/proxy/proxy_http.c +++ b/modules/proxy/proxy_http.c @@ -180,7 +180,7 @@ int ap_proxy_http_handler(request_rec *r, char *url, const char *proxyname, int proxyport) { request_rec *rp; - apr_pool_t *p = r->pool; + apr_pool_t *p = r->connection->pool; const char *connectname; int connectport = 0; apr_sockaddr_t *uri_addr; @@ -220,13 +220,13 @@ int ap_proxy_http_handler(request_rec *r, char *url, "proxy: HTTP connecting %s to %s:%d", url, uri.hostname, uri.port); /* do a DNS lookup for the destination host */ - err = apr_sockaddr_info_get(&uri_addr, uri.hostname, APR_UNSPEC, uri.port, 0, p); + err = apr_sockaddr_info_get(&uri_addr, uri.hostname, APR_UNSPEC, uri.port, 0, r->server->process->pconf); /* are we connecting directly, or via a proxy? */ if (proxyname) { connectname = proxyname; connectport = proxyport; - err = apr_sockaddr_info_get(&connect_addr, proxyname, APR_UNSPEC, proxyport, 0, p); + err = apr_sockaddr_info_get(&connect_addr, proxyname, APR_UNSPEC, proxyport, 0, r->server->process->pconf); } else { connectname = uri.hostname; -- 2.50.1