[gnome-control-center] info: Don't leak GUnixMountEntry instances if we're cancelled



commit 6ee793118ac213442758d0d2d1e8e640f5cd397d
Author: Rui Matos <tiagomatos gmail com>
Date:   Sun Aug 27 20:08:15 2017 +0200

    info: Don't leak GUnixMountEntry instances if we're cancelled
    
    If we're cancelled the mount entries list might not have been totally
    consumed so free it on finalize if needed.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=786097

 panels/info/cc-info-overview-panel.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/panels/info/cc-info-overview-panel.c b/panels/info/cc-info-overview-panel.c
index 0bc3d63..163d006 100644
--- a/panels/info/cc-info-overview-panel.c
+++ b/panels/info/cc-info-overview-panel.c
@@ -884,6 +884,9 @@ cc_info_overview_panel_finalize (GObject *object)
       g_clear_object (&priv->cancellable);
     }
 
+  if (priv->primary_mounts)
+    g_list_free_full (priv->primary_mounts, (GDestroyNotify) g_unix_mount_free);
+
   g_free (priv->gnome_version);
   g_free (priv->gnome_date);
   g_free (priv->gnome_distributor);


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