[gnome-control-center/gnome-3-16] background: Fix a few memory leaks



commit b086e7da76bbe475ebd3ad877338a50de2100d68
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Oct 27 16:33:19 2015 +0100

    background: Fix a few memory leaks
    
    https://bugzilla.gnome.org/show_bug.cgi?id=757189

 panels/background/bg-pictures-source.c |    1 +
 panels/background/cc-background-xml.c  |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/panels/background/bg-pictures-source.c b/panels/background/bg-pictures-source.c
index d02045f..de5f189 100644
--- a/panels/background/bg-pictures-source.c
+++ b/panels/background/bg-pictures-source.c
@@ -768,6 +768,7 @@ bg_pictures_source_get_unique_path (const char *uri)
   g_free (filename);
   ret = g_file_get_path (file);
   g_object_unref (file);
+  g_object_unref (parent);
 
   return ret;
 }
diff --git a/panels/background/cc-background-xml.c b/panels/background/cc-background-xml.c
index 974a06e..e6e669d 100644
--- a/panels/background/cc-background-xml.c
+++ b/panels/background/cc-background-xml.c
@@ -288,6 +288,8 @@ cc_background_xml_load_xml_internal (CcBackgroundXml *xml,
             file = g_file_new_for_uri (uri);
            if (g_file_query_exists (file, NULL) == FALSE)
              {
+               g_free (cname);
+               g_object_unref (file);
                g_object_unref (item);
                continue;
              }


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