If listen() fails, we need to keep the message about it, which is copied then
in errmsg buffer on the error path. This buffer is properly provided by the
caller (protocol_bind_all()) and reallocated if needed in memprintf(), but
it was deleted without being returned.
This can be backported to all stable versions.
(cherry picked from commit
81f48395b325b9875d215ec2743e75f7a56e1e5f)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
goto tcp_return;
tcp_close_return:
- free_trash_chunk(msg);
- msg = NULL;
fd_delete(fd);
tcp_return:
if (msg && errlen && msg->data) {