im.pidgin.pidgin: 7a8f58fc7611c332a05ed1c1b8417be24c9cf981

datallah at pidgin.im datallah at pidgin.im
Wed Feb 20 00:10:44 EST 2008


-----------------------------------------------------------------
Revision: 7a8f58fc7611c332a05ed1c1b8417be24c9cf981
Ancestor: 30ee89e929f7bc81f4ba11c947dadce9cc07579c
Author: datallah at pidgin.im
Date: 2008-02-20T05:07:09
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/7a8f58fc7611c332a05ed1c1b8417be24c9cf981

Modified files:
        pidgin/gtkaccount.c pidgin/gtkblist.c pidgin/gtklog.c

ChangeLog: 

Plug some leaks caused by GtkTreePaths not being freed.

-------------- next part --------------
============================================================
--- pidgin/gtkaccount.c	30a8beef9fac237de36fec930c9c2620b4f86569
+++ pidgin/gtkaccount.c	eab593e665e6425c44421c59170ecfbc811cdcfb
@@ -2092,8 +2092,10 @@ account_treeview_double_click_cb(GtkTree
 	/* Figure out which node was clicked */
 	if (!gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(dialog->treeview), event->x, event->y, &path, &column, NULL, NULL))
 		return FALSE;
-	if (column == gtk_tree_view_get_column(treeview, 0))
+	if (column == gtk_tree_view_get_column(treeview, 0)) {
+		gtk_tree_path_free(path);
 		return FALSE;
+	}
 
 	gtk_tree_model_get_iter(GTK_TREE_MODEL(dialog->model), &iter, path);
 	gtk_tree_path_free(path);
============================================================
--- pidgin/gtkblist.c	e1f5d7320ccc714f48b64e180c8b94fe157706fb
+++ pidgin/gtkblist.c	92dfab1ca6fc84185382e4df461a8205dacf242a
@@ -2953,6 +2953,9 @@ static gboolean pidgin_blist_drag_motion
 	gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(tv), x, y, &path, NULL, NULL, NULL);
 	gtk_tree_view_get_cell_area(GTK_TREE_VIEW(tv), path, NULL, &rect);
 
+	if (path)
+		gtk_tree_path_free(path);
+
 	/* Only autoexpand when in the middle of the cell to avoid annoying un-intended expands */
 	if (y < rect.y + (rect.height / 3) ||
 	    y > rect.y + (2 * (rect.height /3)))
@@ -2963,8 +2966,6 @@ static gboolean pidgin_blist_drag_motion
 
 	gtkblist->tip_rect = rect;
 
-	if (path)
-		gtk_tree_path_free(path);
 	gtkblist->drag_timeout = g_timeout_add(delay, (GSourceFunc)pidgin_blist_expand_timeout, tv);
 
 	if (gtkblist->mouseover_contact) {
============================================================
--- pidgin/gtklog.c	0a03dc067e8e7fdb9b211c227745bda139ba017e
+++ pidgin/gtklog.c	ea6c3b2c4e0412a64c00ce3a14fbf03d1ba70a28
@@ -263,11 +263,10 @@ static void delete_log_cb(gpointer *data
 				gtk_tree_store_remove(treestore, iter);
 			}
 		}
-		gtk_tree_path_free(path);
 #else
 		gtk_tree_store_remove(treestore, iter);
-		gtk_tree_path_free(path);
 #endif
+		gtk_tree_path_free(path);
 	}
 
 	delete_log_cleanup_cb(data);
@@ -363,6 +362,7 @@ static gboolean log_button_press_cb(GtkW
 		gtk_tree_model_get_iter(GTK_TREE_MODEL(lv->treestore), iter, path);
 		val.g_type = 0;
 		gtk_tree_model_get_value(GTK_TREE_MODEL(lv->treestore), iter, 1, &val);
+		gtk_tree_path_free(path);
 
 		log = g_value_get_pointer(&val);
 


More information about the Commits mailing list