[vlc-devel] [PATCH] vlccore: os2: fix memory leak of freeaddrinfo()

KO Myung-Hun komh78 at gmail.com
Thu Nov 20 01:56:04 CET 2014


KO Myung-Hun wrote:
> 
> 
> Rémi Denis-Courmont wrote:
>> Le 2014-11-14 06:00, KO Myung-Hun a écrit :
>>> ---
>>>  src/os2/getaddrinfo.c | 4 +++-
>>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/src/os2/getaddrinfo.c b/src/os2/getaddrinfo.c
>>> index 1a3f8a4..b220fc1 100644
>>> --- a/src/os2/getaddrinfo.c
>>> +++ b/src/os2/getaddrinfo.c
>>> @@ -157,9 +157,11 @@ void freeaddrinfo (struct addrinfo *res)
>>>  {
>>>      if (res == NULL)
>>>          return;
>>> +
>>> +    freeaddrinfo (res->ai_next);
>>> +
>>>      free (res->ai_canonname);
>>>      free (res->ai_addr);
>>> -    free (res->ai_next);
>>>      free (res);
>>>  }
>>
>> This calls for a while loop.
>>
> 
> They will be freed recursively.
> 

Ping ?

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr




More information about the vlc-devel mailing list