From 5661b7b99156a87c29327c74f60d0ebf435655cc Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Wed, 5 Oct 2011 09:53:09 -0500 Subject: [PATCH] Don't leak the bookmarks when enumerating them Signed-off-by: Federico Mena Quintero --- gtk/gtkplacessidebar.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c index e71c31ac6c..fe13811594 100644 --- a/gtk/gtkplacessidebar.c +++ b/gtk/gtkplacessidebar.c @@ -749,13 +749,15 @@ update_places (GtkPlacesSidebar *sidebar) sidebar->uri, mount_uri, last_uri, &last_iter, &select_path); - g_object_unref (root); g_object_unref (icon); g_free (mount_uri); g_free (tooltip); g_free (bookmark_name); } + g_slist_foreach (bookmarks, (GFunc) g_object_unref, NULL); + g_slist_free (bookmarks); + last_iter = add_heading (sidebar, SECTION_COMPUTER, _("Computer"));