[vlc-devel] [PATCH] vlccore: os2: fix memory leak of freeaddrinfo()
KO Myung-Hun
komh78 at gmail.com
Fri Nov 14 04:00:16 CET 2014
---
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);
}
--
1.8.5.2
More information about the vlc-devel
mailing list