Skip to contentSkip to conversation

tabled: zero GList host_list or else crash

PATCH In review Pete Zaitcev 2 participants 2 messages Aug 13, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/7 tabled: zero GList host_list or else crash

Awkward API: a Glib's list must be NULL at the start, and cldc_getaddr appends to an existing list.

server/cldu.c +1 -1
index 9ce61b7..f1c2d4d 100644
@@ -583,7 +583,7 @@ int cld_begin(const char *thishost, const char *thiscell,
 	}
 
 	if (!ses.forced_hosts) {
-		GList *tmp, *host_list;
+		GList *tmp, *host_list = NULL;
 		int i;
 
 		if (cldc_getaddr(&host_list, thishost, debugging, applog)) {