[nautilus] places-sidebar: fix mem leak



commit ed611099f65501088bda8924265c7ff04bff69a7
Author: Pavel Vasin <rat4vier gmail com>
Date:   Tue Jan 1 14:37:12 2013 +0400

    places-sidebar: fix mem leak
    
    https://bugzilla.gnome.org/show_bug.cgi?id=691004

 src/nautilus-places-sidebar.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c
index a7b5b15..eb01f2b 100644
--- a/src/nautilus-places-sidebar.c
+++ b/src/nautilus-places-sidebar.c
@@ -380,7 +380,8 @@ add_special_dirs (NautilusPlacesSidebar *sidebar)
 
 	dirs = NULL;
 	for (index = 0; index < G_USER_N_DIRECTORIES; index++) {
-		const char *path, *name;
+		const char *path;
+		char *name;
 		GFile *root;
 		GIcon *icon;
 		char *mount_uri;
@@ -435,6 +436,7 @@ add_special_dirs (NautilusPlacesSidebar *sidebar)
 
 		g_object_unref (root);
 		g_object_unref (icon);
+		g_free (name);
 		g_free (mount_uri);
 
 		dirs = g_list_prepend (dirs, (char *)path);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]