changeset 4950:e81625009ab3

[gaim-migrate @ 5284] Fixed parse_toc_buddy_list committer: Tailor Script <tailor@pidgin.im>
author Herman Bloggs <hermanator12002@yahoo.com>
date Tue, 01 Apr 2003 17:27:58 +0000
parents e8c0b116a9a3
children 207f1e546849
files src/list.c
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/list.c	Tue Apr 01 16:57:05 2003 +0000
+++ b/src/list.c	Tue Apr 01 17:27:58 2003 +0000
@@ -538,7 +538,7 @@
 					struct buddy *b = gaim_buddy_new(account, nm, sw);
 					struct group *g = gaim_find_group(current);
 					gaim_blist_add_buddy(b, g, NULL);
-					bud = g_list_append(bud, nm);
+					bud = g_list_append(bud, g_strdup(nm));
 				}
 			} else if (*c == 'p') {
 				gaim_privacy_permit_add(account, c + 2);
@@ -558,8 +558,14 @@
 		} while ((c = strtok(NULL, "\n")));
 
 		if(account->gc) {
-			if(bud)
+			if(bud) {
+				GList *node = bud;
 				serv_add_buddies(account->gc, bud);
+				while(node) {
+					g_free(node->data);
+					node = node->next;
+				}
+			}
 			serv_set_permit_deny(account->gc);
 		}
 		g_list_free(bud);