Commit a3d3516f authored by Haithem BEN GHORBAL's avatar Haithem BEN GHORBAL Committed by Carlos Garnacho

libtracker-miner: Fix some memory leaks of TrackerTask

These leaks had huge impact as each TrackerTask had a reference
to a GFile, which prevent them to be removed from TrackerFileSystem
when calling tracker_file_system_forget_files(). Due to this behavior,
adding/removing/re-adding folders resulted in some folders/files not
being indexed.
parent 4057ee9d
......@@ -1647,6 +1647,7 @@ item_remove (TrackerMinerFS *fs,
G_PRIORITY_DEFAULT,
sparql_buffer_task_finished_cb,
fs);
tracker_task_unref (task);
}
g_object_unref (builder);
......@@ -1677,6 +1678,7 @@ item_remove (TrackerMinerFS *fs,
G_PRIORITY_DEFAULT,
sparql_buffer_task_finished_cb,
fs);
tracker_task_unref (task);
/* SECOND:
* Actually remove all resources. This operation is the one which may take
......@@ -1697,6 +1699,7 @@ item_remove (TrackerMinerFS *fs,
G_PRIORITY_DEFAULT,
sparql_buffer_task_finished_cb,
fs);
tracker_task_unref (task);
}
if (!tracker_task_pool_limit_reached (TRACKER_TASK_POOL (fs->priv->sparql_buffer))) {
......@@ -2020,6 +2023,7 @@ item_move (TrackerMinerFS *fs,
G_PRIORITY_DEFAULT,
sparql_buffer_task_finished_cb,
fs);
tracker_task_unref (task);
if (!tracker_task_pool_limit_reached (TRACKER_TASK_POOL (fs->priv->sparql_buffer))) {
item_queue_handlers_set_up (fs);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment