]> granicus.if.org Git - apache/commitdiff
More pool allocation errors. The apr_sockaddr_t structures connect_addr and
authorVictor J. Orlikowski <orlikowski@apache.org>
Fri, 6 Apr 2001 01:59:26 +0000 (01:59 +0000)
committerVictor J. Orlikowski <orlikowski@apache.org>
Fri, 6 Apr 2001 01:59:26 +0000 (01:59 +0000)
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

index 3abf583f684600baa42a3cc05daf09a11a9812a1..4fdaede9915f79336c62061a460426f416d4050b 100644 (file)
@@ -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;