[gtk+/places-sidebar] Avoid an useless ref/unref



commit 0523b2f7192b18702d59ff88e0c957921ad43248
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Jan 21 17:00:50 2013 -0500

    Avoid an useless ref/unref
    
    The GMount will be kept alive by the async operation itself.

 gtk/gtkplacessidebar.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c
index 018eeed..1bdb1dd 100644
--- a/gtk/gtkplacessidebar.c
+++ b/gtk/gtkplacessidebar.c
@@ -2163,7 +2163,6 @@ unmount_mount_cb (GObject *source_object,
 	/* FIXME: we need to switch to a path that is available now - $HOME? */
 
 	g_object_unref (sidebar);
-	g_object_unref (mount);
 }
 
 static void
@@ -2221,10 +2220,7 @@ do_unmount (GMount *mount,
 	if (mount != NULL) {
 		GMountOperation *mount_op;
 
-		g_object_ref (mount);
-
 		mount_op = get_unmount_operation (sidebar);
-
 		g_mount_unmount_with_operation (mount,
 						0,
 						mount_op,



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