diff libpurple/stun.c @ 26851:6bc0e4e76207

merge of '9df36977fc8f70d1b3124d32a54eb123df50aa0f' and 'f92d95c83baba97463f923077688ba2eb144763b'
author Peter Hjalmarsson <xake@rymdraket.net>
date Fri, 01 May 2009 21:36:29 +0000
parents 5d1140b0b10a
children 627d23bfdb05
line wrap: on
line diff
--- a/libpurple/stun.c	Mon Mar 16 21:44:22 2009 +0000
+++ b/libpurple/stun.c	Fri May 01 21:36:29 2009 +0000
@@ -341,6 +341,12 @@
 	}
 
 	if (!purple_network_listen_range(12108, 12208, SOCK_DGRAM, hbn_listen_cb, hosts)) {
+		while(hosts) {
+			hosts = g_slist_remove(hosts, hosts->data);
+			g_free(hosts->data);
+			hosts = g_slist_remove(hosts, hosts->data);
+		}
+
 		nattype.status = PURPLE_STUN_STATUS_UNKNOWN;
 		nattype.lookup_time = time(NULL);
 		do_callbacks();