From 2aa27e3a01b504ba0b63c1122d72f94005c19e71 Mon Sep 17 00:00:00 2001 From: Christophe Jaillet Date: Sun, 27 May 2018 20:38:39 +0000 Subject: [PATCH] All error handling paths of this function call 'apr_socket_close()' , except this one. So add it here too. Probably spotted with the help of the Coccinelle software (Thx Julia for the patch and for Coccinelle) See PR 53015 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1832348 13f79535-47bb-0310-9956-ffa450edef68 --- modules/proxy/mod_proxy_connect.c | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/proxy/mod_proxy_connect.c b/modules/proxy/mod_proxy_connect.c index 64986178643..46262e2a59d 100644 --- a/modules/proxy/mod_proxy_connect.c +++ b/modules/proxy/mod_proxy_connect.c @@ -305,6 +305,7 @@ static int proxy_connect_handler(request_rec *r, proxy_worker *worker, backconn->aborted = 1; ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01022) "pre_connection setup failed (%d)", rc); + apr_socket_close(sock); return HTTP_INTERNAL_SERVER_ERROR; } -- 2.47.3