changeset 21019:f119cd1cb47c

Fix a leak of the dns query results.
author Daniel Atallah <daniel.atallah@gmail.com>
date Fri, 26 Oct 2007 05:10:16 +0000
parents aed039f5360b
children f710e48fbe1b
files libpurple/protocols/bonjour/mdns_win32.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/bonjour/mdns_win32.c	Fri Oct 26 05:07:17 2007 +0000
+++ b/libpurple/protocols/bonjour/mdns_win32.c	Fri Oct 26 05:10:16 2007 +0000
@@ -147,7 +147,11 @@
 	}
 
 	/* free the hosts list*/
-	g_slist_free(hosts);
+	while (hosts != NULL) {
+		hosts = g_slist_remove(hosts, hosts->data);
+		g_free(hosts->data);
+		hosts = g_slist_remove(hosts, hosts->data);
+	}
 
 	/* free the remaining args memory */
 	g_free(args->full_service_name);