diff src/gtkblist.c @ 10504:1a97d5e88d12

[gaim-migrate @ 11796] Lots of things here: - Several memory leak fixes - A few invalid memory access fixes - Fix a yahoo crash going idle when away - Fix Add user in chats to actually fill in the screenname - Add gaim_account_{get,set}_enabled to perl - Fix command priorities (fixes /me in IRC) - Fix MSN notification server transfer to be quiet about it - Fix MSN blist sync if user has insane friendly name - Make the docklet less crash-happy if it fails to embed in 3 seconds - Only probe for native plugins with the correct file extension - 1 typo fix :) ... and quite possibly something else I forgot. committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Tue, 11 Jan 2005 17:25:06 +0000
parents 4806967e093e
children 1044c0930e03
line wrap: on
line diff
--- a/src/gtkblist.c	Tue Jan 11 02:00:44 2005 +0000
+++ b/src/gtkblist.c	Tue Jan 11 17:25:06 2005 +0000
@@ -2227,8 +2227,10 @@
 	gtk_tree_model_get_value (GTK_TREE_MODEL(gtkblist->treemodel), &iter, NODE_COLUMN, &val);
 	node = g_value_get_pointer(&val);
 
-	if(!GAIM_BLIST_NODE_IS_CONTACT(node))
+	if(!GAIM_BLIST_NODE_IS_CONTACT(node)) {
+		gtk_tree_path_free(path);
 		return FALSE;
+	}
 
 	gtknode = node->ui_data;
 
@@ -2278,14 +2280,14 @@
 	gtk_tree_model_get_value (GTK_TREE_MODEL(gtkblist->treemodel), &iter, NODE_COLUMN, &val);
 	node = g_value_get_pointer(&val);
 
+	gtk_tree_path_free(path);
+
 	if(!GAIM_BLIST_NODE_IS_CONTACT(node) && !GAIM_BLIST_NODE_IS_BUDDY(node)
 			&& !GAIM_BLIST_NODE_IS_CHAT(node))
 		return FALSE;
 
 	gtknode = node->ui_data;
 
-	gtk_tree_path_free(path);
-
 	tooltiptext = gaim_get_tooltip_text(node);
 
 	if(!tooltiptext)
@@ -3634,9 +3636,13 @@
 	if(node->parent)
 		gaim_gtk_blist_update(list, node->parent);
 
-	/* There's something I don't understand here */
-	/* g_free(node->ui_data);
-	node->ui_data = NULL; */
+	/* There's something I don't understand here - Ethan */
+	/* Ethan said that back in 2003, but this g_free has been left commented
+	 * out ever since. I can't find any reason at all why this is bad and
+	 * valgrind found several reasons why it's good. If this causes problems
+	 * comment it out again. Stu */
+	g_free(node->ui_data);
+	node->ui_data = NULL;
 }
 
 static gboolean do_selection_changed(GaimBlistNode *new_selection)