BUG/MEDIUM: servers: Only destroy a conn_stream we just allocated.
authorOlivier Houchard <ohouchard@haproxy.com>
Tue, 29 Jan 2019 14:50:38 +0000 (15:50 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 29 Jan 2019 18:47:20 +0000 (19:47 +0100)
commit4dc85538ba6333ef493ff6c81edf6772db1556b2
treecf1e2b283448dc2255d1b5f9c1a60474f2c6784c
parentf67be93ae0caa8de538b5e2ac6fa1eef90e3f9cd
BUG/MEDIUM: servers: Only destroy a conn_stream we just allocated.

In connect_server(), if we failed to add the connection to the session,
only destroy the conn_stream if we just allocated it, otherwise it may
have been allocated outside connect_server(), along with a connection which
has its destination address set.
Also use si_release_endpoint() instead of cs_destroy(), to make sure the
stream_interface doesn't reference it anymore.

This should be backported to 1.9.
src/backend.c