[grilo-plugins] local-metadata: don't double-free cancellable



commit b5a05ec50b5513d084e0a14d407c55b645f4bc22
Author: Simon McVittie <simon mcvittie collabora co uk>
Date:   Thu Jul 16 14:51:19 2015 +0100

    local-metadata: don't double-free cancellable
    
    resolve_album_art() is "balanced" with respect to the cancellable's
    refcount: it exits with 1 reference to the cancellable owned by
    the operation_id, having arranged for that reference to be destroyed
    by a GDestroyNotify when the operation_id finishes. There
    is no need for resolve_album_art_cb() to release the same reference.
    
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=752057

 src/local-metadata/grl-local-metadata.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
---
diff --git a/src/local-metadata/grl-local-metadata.c b/src/local-metadata/grl-local-metadata.c
index 4d55976..f0e6e92 100644
--- a/src/local-metadata/grl-local-metadata.c
+++ b/src/local-metadata/grl-local-metadata.c
@@ -843,14 +843,12 @@ resolve_album_art_cb (GObject       *source_object,
 {
   GFile *cache_file;
   ResolveData *resolve_data;
-  GCancellable *cancellable = NULL;
   GFileInfo *info = NULL;
   GError *error = NULL;
 
   cache_file = G_FILE (source_object);
   resolve_data = user_data;
 
-  cancellable = grl_operation_get_data (resolve_data->rs->operation_id);
   info = g_file_query_info_finish (cache_file, result, &error);
 
   if (info != NULL) {
@@ -867,7 +865,6 @@ resolve_album_art_cb (GObject       *source_object,
 
   g_clear_object (&info);
   g_clear_error (&error);
-  g_clear_object (&cancellable);
 }
 
 static void


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