mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04:00
BUG/MAJOR: connections: Close the connection before freeing it.
In si_release_endpoint(), if the end point is a connection, because we don't know which mux to use it, make sure we close the connection before freeing it, or else, we'd have a fd left for polling, which would point to a now free'd connection. This should be backported to 1.9.
This commit is contained in:
parent
822305067b
commit
8ab8a6eee5
1 changed files with 4 additions and 1 deletions
|
|
@ -173,8 +173,11 @@ static inline void si_release_endpoint(struct stream_interface *si)
|
|||
if (appctx->applet->release && si->state < SI_ST_DIS)
|
||||
appctx->applet->release(appctx);
|
||||
appctx_free(appctx); /* we share the connection pool */
|
||||
} else if ((conn = objt_conn(si->end)))
|
||||
} else if ((conn = objt_conn(si->end))) {
|
||||
conn_stop_tracking(conn);
|
||||
conn_full_close(conn);
|
||||
conn_free(conn);
|
||||
}
|
||||
si_detach_endpoint(si);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue