]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
nss: Remove unused allocation from get_nscd_addresses in getaddrinfo
authorFlorian Weimer <fweimer@redhat.com>
Wed, 20 Dec 2023 15:14:33 +0000 (16:14 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Wed, 20 Dec 2023 15:14:33 +0000 (16:14 +0100)
No bug because this is not visible if glibc is built with
optimization.  Otherwise this would be a critical resource leak.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
nss/getaddrinfo.c

index 531124958d037733ccee13bf59f97ab4a36ffdd4..ce3af931b2922cc1c46a2d5a3575b7cc1acbc1c6 100644 (file)
@@ -514,7 +514,6 @@ get_nscd_addresses (const char *name, const struct addrinfo *req,
   int result = 0;
   char *addrs = air->addrs;
 
-  struct gaih_addrtuple *addrfree = calloc (air->naddrs, sizeof (*addrfree));
   struct gaih_addrtuple *at = calloc (air->naddrs, sizeof (*at));
   if (at == NULL)
     {