Commit de73369a authored by Victor J. Orlikowski's avatar Victor J. Orlikowski
Browse files

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
parent 3ea2099d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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;