]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
All error handling paths of this function call 'apr_socket_close()' , except this...
authorChristophe Jaillet <jailletc36@apache.org>
Sun, 27 May 2018 20:38:39 +0000 (20:38 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Sun, 27 May 2018 20:38:39 +0000 (20:38 +0000)
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

index 64986178643c779fbbcb295100b127c5c0ead194..46262e2a59df2530461bd033012be2ac4dc6cdb1 100644 (file)
@@ -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;
     }