[PATCH 03/12] getaddrinfo: Fix leak with AI_ALL [BZ #28852]
Siddhesh Poyarekar
siddhesh@sourceware.org
Tue Mar 8 13:45:31 GMT 2022
On 08/03/2022 16:30, Andreas Schwab wrote:
> On Mär 08 2022, Siddhesh Poyarekar via Libc-alpha wrote:
>
>> @@ -212,10 +209,30 @@ convert_hostent_to_gaih_addrtuple (const struct addrinfo *req,
>> if (count == 0 || h->h_length > sizeof (((struct gaih_addrtuple) {}).addr))
>> return true;
>>
>> - struct gaih_addrtuple *array = calloc (count, sizeof (*array));
>> + struct gaih_addrtuple *array = *result;
>> + size_t old = 0;
>> +
>> + while (array)
>
> array != NULL
>
Thanks, fixed locally.
Siddhesh
More information about the Libc-alpha
mailing list