]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: dns: dns_connect_nameserver: fix fd leak at error path master
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Fri, 22 Aug 2025 07:55:40 +0000 (09:55 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 22 Aug 2025 08:50:47 +0000 (10:50 +0200)
commit0dc8d8d027114262bc470d94ecc2664523961446
treebae6583965b8c2c4fd45ab02de8ec5d97e578b63
parenta498e527b412d8b66e27d2175bfad3101f6dbedb
MINOR: dns: dns_connect_nameserver: fix fd leak at error path

This fixes the commit 2c7e05f80e3b
("MEDIUM: dns: don't call connect to dest socket for AF_INET*"). If we fail to
bind AF_INET sockets or the address family of the nameserver protocol isn't
something, what we expect, we need to close the fd, obtained by
connect.

This fixes the issue GitHub #3085
This must be backported along with the commit 2c7e05f80e3b.
src/dns.c