From: Olivier Houchard Date: Thu, 13 Dec 2018 14:40:16 +0000 (+0100) Subject: BUG/MEDIUM: connection: Just make sure we closed the fd on connection failure. X-Git-Tag: v1.9-dev11~67 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=25b4015363fe4dc59b84715779674aaf4572c36b;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: connection: Just make sure we closed the fd on connection failure. When the connection failed, we don't really want to close the conn_stream, as we're probably about to retry, so just make sure the file descriptor is closed. --- diff --git a/src/stream.c b/src/stream.c index 2e8d75562e..7c2a63aca3 100644 --- a/src/stream.c +++ b/src/stream.c @@ -650,11 +650,10 @@ static int sess_update_st_con_tcp(struct stream *s) si->state = SI_ST_CER; if (srv_cs) - cs_close(srv_cs); - else if (conn) { + conn = srv_cs->conn; + if (conn) { conn_stop_tracking(conn); conn_full_close(conn); - conn_free(conn); } if (si->err_type)