]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* Clear the dns_pool before to avoid a memory leak in case we did the lookup
authorRuediger Pluem <rpluem@apache.org>
Tue, 25 Apr 2023 11:57:22 +0000 (11:57 +0000)
committerRuediger Pluem <rpluem@apache.org>
Tue, 25 Apr 2023 11:57:22 +0000 (11:57 +0000)
  again.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1909401 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/proxy_util.c

index be907af07897383e21c46e14cf0861b6806acce0..c11bac2b26d3c1deeb6d67dcef0db3cde7f2dd45 100644 (file)
@@ -2790,7 +2790,11 @@ ap_proxy_determine_connection(apr_pool_t *p, request_rec *r,
                      * The single DNS lookup is used once per worker.
                      * If dynamic change is needed then set the addr to NULL
                      * inside dynamic config to force the lookup.
+                     *
+                     * Clear the dns_pool before to avoid a memory leak in case
+                     * we did the lookup again.
                      */
+                    apr_pool_clear(worker->cp->dns_pool);
                     err = apr_sockaddr_info_get(&addr,
                                                 conn->hostname, APR_UNSPEC,
                                                 conn->port, 0,