Mercurial > pidgin
diff src/buddy.c @ 4721:91ef4fae4a49
[gaim-migrate @ 5033]
plug a leak or two, and make removing buddies not blow up.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Wed, 12 Mar 2003 02:27:28 +0000 |
parents | 8ecc83cad126 |
children | 534eaa4ead94 |
line wrap: on
line diff
--- a/src/buddy.c Wed Mar 12 01:34:25 2003 +0000 +++ b/src/buddy.c Wed Mar 12 02:27:28 2003 +0000 @@ -192,8 +192,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_BUDDY(node)) + if (!GAIM_BLIST_NODE_IS_BUDDY(node)) { + gtk_tree_path_free(path); return FALSE; + } menu = gtk_menu_new(); @@ -237,6 +239,7 @@ * the event propoagates down and somehow gets interpreted as the start of a drag event. */ sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(tv)); gtk_tree_selection_select_path(sel, path); + gtk_tree_path_free(path); return TRUE; #endif } @@ -312,8 +315,10 @@ 8, /* bits */ (void*)&node, sizeof (node)); + + gtk_tree_path_free(sourcerow); } - + } static void gaim_gtk_blist_drag_data_rcv_cb(GtkWidget *widget, GdkDragContext *dc, guint x, guint y, @@ -326,6 +331,7 @@ memcpy(&b, sd->data, sizeof(b)); if(gtk_tree_view_get_dest_row_at_pos(GTK_TREE_VIEW(widget), x, y, &path, &position)) { /* if we're here, I think it means the drop is ok */ + gtk_tree_path_free(path); } } } @@ -872,6 +878,7 @@ * we expand the group node */ GtkTreePath *path = gtk_tree_model_get_path(GTK_TREE_MODEL(gtkblist->treemodel), &groupiter); gtk_tree_view_expand_row(GTK_TREE_VIEW(gtkblist->treeview), path, TRUE); + gtk_tree_path_free(path); } } }