mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-09 16:47:18 +02:00
BUG/MEDIUM: session: properly clean the outgoing connection before freeing.
In session_free(), make sure the outgoing connection is not in the idle list anymore, and it does no longer have an owner, so that it will properly be destroyed and nobody will be able to access it.
This commit is contained in:
parent
a30a40bcca
commit
d7d627c0b9
@ -78,9 +78,12 @@ void session_free(struct session *sess)
|
||||
if (conn != NULL && conn->mux)
|
||||
conn->mux->destroy(conn);
|
||||
conn = sess->srv_conn;
|
||||
if (conn != NULL && conn->mux)
|
||||
if (conn != NULL && conn->mux) {
|
||||
LIST_DEL(&conn->list);
|
||||
LIST_INIT(&conn->list);
|
||||
conn->owner = NULL;
|
||||
conn->mux->destroy(conn);
|
||||
else if (conn) {
|
||||
} else if (conn) {
|
||||
/* We have a connection, but not yet an associated mux.
|
||||
* So destroy it now.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user