Commit e4e7de5b authored by Gabriel Ivascu's avatar Gabriel Ivascu

Fix leaks of GtkContainer children list

parent 49ebf910
......@@ -662,6 +662,7 @@ entry_populate_popup_cb (GtkEntry *entry,
if (GTK_IS_SEPARATOR_MENU_ITEM (item->data))
sep++;
}
g_list_free (children);
gtk_menu_shell_insert (GTK_MENU_SHELL (menu), clear_menuitem, pos - 1);
......@@ -676,6 +677,7 @@ entry_populate_popup_cb (GtkEntry *entry,
}
}
g_assert (paste_menuitem != NULL);
g_list_free (children);
g_signal_connect (paste_and_go_menuitem, "activate",
G_CALLBACK (entry_paste_and_go_activate_cb), lentry);
......
......@@ -79,6 +79,7 @@ remove_bookmark_row_from_container (GtkContainer *container,
break;
}
}
g_list_free (children);
}
static void
......@@ -151,6 +152,7 @@ ephy_bookmarks_popover_bookmark_tag_removed_cb (EphyBookmarksPopover *self,
}
}
}
g_list_free (children);
if (!exists) {
row = create_bookmark_row (bookmark, self);
......@@ -185,6 +187,7 @@ ephy_bookmarks_popover_bookmark_tag_removed_cb (EphyBookmarksPopover *self,
if (g_strcmp0 (title, tag) == 0)
gtk_container_remove (GTK_CONTAINER (self->tags_list_box), GTK_WIDGET (l->data));
}
g_list_free (children);
}
}
......@@ -367,17 +370,17 @@ ephy_bookmarks_popover_actions_tag_detail_back (GSimpleAction *action,
gpointer user_data)
{
EphyBookmarksPopover *self = user_data;
GList *l;
GList *children;
g_assert (EPHY_IS_BOOKMARKS_POPOVER (self));
gtk_stack_set_visible_child_name (GTK_STACK (self->toplevel_stack),
"default");
for (l = gtk_container_get_children (GTK_CONTAINER (self->tag_detail_list_box));
l != NULL;
l = l->next)
children = gtk_container_get_children (GTK_CONTAINER (self->tag_detail_list_box));
for (GList *l = children; l != NULL; l = l->next)
gtk_container_remove (GTK_CONTAINER (self->tag_detail_list_box), l->data);
g_list_free (children);
}
static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment