From 50269ab1d999346f35e7dd1b40f07028b8501a22 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Mon, 18 Nov 2013 14:15:32 +0100 Subject: [PATCH] background: Fix a memory leak when add_single_file failed https://bugzilla.gnome.org/show_bug.cgi?id=708942 --- panels/background/bg-pictures-source.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panels/background/bg-pictures-source.c b/panels/background/bg-pictures-source.c index a61164180..038b4f58b 100644 --- a/panels/background/bg-pictures-source.c +++ b/panels/background/bg-pictures-source.c @@ -279,12 +279,12 @@ add_single_file (BgPicturesSource *bg_source, g_file_read_async (file, G_PRIORITY_DEFAULT, bg_source->priv->cancellable, picture_opened_for_read, bg_source); - g_object_unref (file); retval = TRUE; out: g_clear_object (&item); + g_object_unref (file); g_free (uri); return retval; }