From: Victor J. Orlikowski Date: Fri, 6 Apr 2001 01:59:26 +0000 (+0000) Subject: More pool allocation errors. The apr_sockaddr_t structures connect_addr and X-Git-Tag: 2.0.17~110 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d4e9fbed547ad600bccedbc1d33ed8cb21a5d1b;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/modules/proxy/proxy_http.c b/modules/proxy/proxy_http.c index 3abf583f684..4fdaede9915 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;