[nautilus] nautilus-file-utilities: Add GVolumeMonitor auto cleanup



commit 44601d99bacc21082f335603f0bf78f1ef9922d0
Author: Wong Heung Sang <hswongac gmail com>
Date:   Sun Jun 3 03:49:55 2018 +0800

    nautilus-file-utilities: Add GVolumeMonitor auto cleanup
    
    In nautilus_get_mounted_mount_for_root
    g_volume_monitor_get is called
    without cleanup
    
    We need cleanup or auto cleanup
    for GVolumeMonitor
    
    g_autoptr is added for auto cleanup
    
    Closes https://gitlab.gnome.org/GNOME/nautilus/issues/471

 src/nautilus-file-utilities.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/nautilus-file-utilities.c b/src/nautilus-file-utilities.c
index 7cda42053..d898806bc 100644
--- a/src/nautilus-file-utilities.c
+++ b/src/nautilus-file-utilities.c
@@ -526,7 +526,7 @@ nautilus_is_other_locations_directory (GFile *dir)
 GMount *
 nautilus_get_mounted_mount_for_root (GFile *location)
 {
-    GVolumeMonitor *volume_monitor;
+    g_autoptr (GVolumeMonitor) volume_monitor = NULL;
     GList *mounts;
     GList *l;
     GMount *mount;


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