]> git.ipfire.org Git - thirdparty/glibc.git/commit
getaddrinfo: Fix leak with AI_ALL [BZ #28852]
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Thu, 3 Mar 2022 17:37:42 +0000 (23:07 +0530)
committerPranav Kant <prka@google.com>
Fri, 2 Feb 2024 00:46:11 +0000 (00:46 +0000)
commit82dcfc6d7bdd5b24a42d8180d31ee403999b9215
treeba89f5783300549fcd107e59afaf9cb3efcea127
parentbe3c0fe888d69cdfda53a8065c5f486d01f7096e
getaddrinfo: Fix leak with AI_ALL [BZ #28852]

Use realloc in convert_hostent_to_gaih_addrtuple and fix up pointers in
the result list so that a single block is maintained for
hostbyname3_r/hostbyname2_r and freed in gaih_inet.  This result is
never merged with any other results, since the hosts database does not
permit merging.

Resolves BZ #28852.

Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Reviewed-by: DJ Delorie <dj@redhat.com>
sysdeps/posix/getaddrinfo.c