[gtk+/places-sidebar: 45/53] Don't leak the bookmarks when	enumerating them
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gtk+/places-sidebar: 45/53] Don't leak the bookmarks when	enumerating them
- Date: Tue,  4 Sep 2012 02:36:33 +0000 (UTC)
commit 5661b7b99156a87c29327c74f60d0ebf435655cc
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed Oct 5 09:53:09 2011 -0500
    Don't leak the bookmarks when enumerating them
    
    Signed-off-by: Federico Mena Quintero <federico gnome org>
 gtk/gtkplacessidebar.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c
index e71c31a..fe13811 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"));
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]