background: Fix a memory leak when add_single_file failed

https://bugzilla.gnome.org/show_bug.cgi?id=708942
This commit is contained in:
Debarshi Ray 2013-11-18 14:15:32 +01:00
parent 428352ee57
commit 50269ab1d9

View file

@ -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;
}