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 5311249..ce3af93 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)
     {