From: Christophe Jaillet Date: Sun, 27 May 2018 20:38:39 +0000 (+0000) Subject: All error handling paths of this function call 'apr_socket_close()' , except this... X-Git-Tag: 2.5.0-alpha2-ci-test-only~2583 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2aa27e3a01b504ba0b63c1122d72f94005c19e71;p=thirdparty%2Fapache%2Fhttpd.git 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 --- 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; }