diff pidgin/gtkblist.c @ 22313:42724bd41274

Plug some leaks caused by GtkTreePaths not being freed.
author Daniel Atallah <daniel.atallah@gmail.com>
date Wed, 20 Feb 2008 05:07:09 +0000
parents 858ce8a1fc8c
children df336908dd15 2f7b42cc612c fdda2b8a4146
line wrap: on
line diff
--- a/pidgin/gtkblist.c	Wed Feb 20 03:04:47 2008 +0000
+++ b/pidgin/gtkblist.c	Wed Feb 20 05:07:09 2008 +0000
@@ -2953,6 +2953,9 @@
 	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 @@
 
 	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) {