Message ID | 87msu71tg1.fsf@oldenburg.str.redhat.com |
---|---|
State | New |
Headers | show |
Series | nss: Remove unused allocation from get_nscd_addresses in getaddrinfo | expand |
On Dez 18 2023, Florian Weimer wrote: > No bug because this is not visible if glibc is built with > optimization. Otherwise this would be a critical resource leak. Ok.
On 12/18/23 09:22, Florian Weimer wrote: > No bug because this is not visible if glibc is built with > optimization. Otherwise this would be a critical resource leak. LGTM. I verified that -Os still optimizes away the calloc(). Reviewed-by: Carlos O'Donell <carlos@redhat.com> > --- > Tested on i686-linux-gnu and x86_64-linux-gnu. > > nss/getaddrinfo.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/nss/getaddrinfo.c b/nss/getaddrinfo.c > index 531124958d..ce3af931b2 100644 > --- a/nss/getaddrinfo.c > +++ b/nss/getaddrinfo.c > @@ -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) > { > > base-commit: 12ab77e893479a1f7d4666082a48efad79777bb9 >
diff --git a/nss/getaddrinfo.c b/nss/getaddrinfo.c index 531124958d..ce3af931b2 100644 --- a/nss/getaddrinfo.c +++ b/nss/getaddrinfo.c @@ -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) {