# HG changeset patch # User Daniel Atallah # Date 1203484029 0 # Node ID 42724bd41274ac6e1aa18e6d87c6dd36d24aa5cd # Parent 01e814b7556b4520facb624267981d6e0602f19c Plug some leaks caused by GtkTreePaths not being freed. diff -r 01e814b7556b -r 42724bd41274 pidgin/gtkaccount.c --- a/pidgin/gtkaccount.c Wed Feb 20 03:04:47 2008 +0000 +++ b/pidgin/gtkaccount.c Wed Feb 20 05:07:09 2008 +0000 @@ -2092,8 +2092,10 @@ /* 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); diff -r 01e814b7556b -r 42724bd41274 pidgin/gtkblist.c --- 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) { diff -r 01e814b7556b -r 42724bd41274 pidgin/gtklog.c --- a/pidgin/gtklog.c Wed Feb 20 03:04:47 2008 +0000 +++ b/pidgin/gtklog.c Wed Feb 20 05:07:09 2008 +0000 @@ -263,11 +263,10 @@ gtk_tree_store_remove(treestore, iter); } } - gtk_tree_path_free(path); #else gtk_tree_store_remove(treestore, iter); +#endif gtk_tree_path_free(path); -#endif } delete_log_cleanup_cb(data); @@ -363,6 +362,7 @@ 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);