[gnome-control-center] background: Fix memory leak in Flickr support
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] background: Fix memory leak in Flickr support
- Date: Fri, 12 Sep 2014 10:06:22 +0000 (UTC)
commit da160033c0003ecd00ed5505f65df57727c12c48
Author: Bastien Nocera <hadess hadess net>
Date: Thu Sep 11 16:46:57 2014 +0200
background: Fix memory leak in Flickr support
When the GrlSourceResultCb callback is called, the media's ownership is
given to the callback function (as per documentation that says "media"
is "transfer full").
panels/background/cc-background-grilo-miner.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/panels/background/cc-background-grilo-miner.c b/panels/background/cc-background-grilo-miner.c
index 1850256..76c86c6 100644
--- a/panels/background/cc-background-grilo-miner.c
+++ b/panels/background/cc-background-grilo-miner.c
@@ -123,7 +123,7 @@ searched_online_source (GrlSource *source,
uri = grl_media_get_url (media);
cache_path = bg_pictures_source_get_unique_path (uri);
cache_file = g_file_new_for_path (cache_path);
- g_object_set_data_full (G_OBJECT (cache_file), "grl-media", g_object_ref (media), g_object_unref);
+ g_object_set_data_full (G_OBJECT (cache_file), "grl-media", media, g_object_unref);
g_file_query_info_async (cache_file,
G_FILE_ATTRIBUTE_STANDARD_TYPE,
G_FILE_QUERY_INFO_NONE,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]