BUG/MINOR: proto_tcp: keep error msg if listen() fails
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Wed, 7 Aug 2024 17:34:07 +0000 (19:34 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 3 Sep 2024 16:38:52 +0000 (18:38 +0200)
commit1038e1517abd397827e7ba65c0cc1d1877cba133
tree6e59776cf9c239fd5c54ec1fad3070b8e5eb5c2c
parentde397e2e9795d2b7a240e8e78b243014d11738e1
BUG/MINOR: proto_tcp: keep error msg if listen() fails

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>
src/proto_tcp.c