[tracker/wip/passive-extraction] decorator: Do not leak TrackerDecoratorInfo structs



commit 37ef2134edf7c7ed4bb78f4b21df23a16890b8e0
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Jan 20 20:03:28 2014 +0100

    decorator: Do not leak TrackerDecoratorInfo structs
    
    Set the only reference to the decorator info as the GTask return
    value, so it is definitely destroyed when the GTask itself is
    unref()'ed.

 src/libtracker-miner/tracker-decorator.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-decorator.c b/src/libtracker-miner/tracker-decorator.c
index d298e0e..e1d5d64 100644
--- a/src/libtracker-miner/tracker-decorator.c
+++ b/src/libtracker-miner/tracker-decorator.c
@@ -1092,7 +1092,7 @@ complete_task (GTask    *task,
        g_assert (node->info);
 
        element_ensure_task (node, g_task_get_source_object (task));
-       g_task_return_pointer (task, tracker_decorator_info_ref (node->info),
+       g_task_return_pointer (task, node->info,
                               (GDestroyNotify) tracker_decorator_info_unref);
        g_object_unref (task);
 }


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