From b37165de9c077f3687ab9bc1b2960c9c7fdbc71f Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Tue, 27 Oct 2015 16:33:19 +0100 Subject: [PATCH] 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(+) diff --git a/panels/background/bg-pictures-source.c b/panels/background/bg-pictures-source.c index d02045fb5..de5f18938 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 974a06e47..e6e669d35 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; }