BUG/MINOR: sock: Unclosed fd in case of connection allocation failure
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Thu, 14 Jan 2021 14:26:24 +0000 (15:26 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 5 Feb 2021 11:14:51 +0000 (12:14 +0100)
commit25dd0ad1239627aa87d9ce25d268546037a97197
tree932e490aacca0171228f9a5f161452b81ff2ecdb
parent1cdc02868771ced6f3f8b5f8dc4725ceae68f842
BUG/MINOR: sock: Unclosed fd in case of connection allocation failure

If allocating a connection object failed right after a successful accept
on a listener, the new file descriptor was not properly closed.

This fixes GitHub issue #905.
It can be backported to 2.3.
src/sock.c