Commit d5ba6f69 authored by Carlos Garnacho's avatar Carlos Garnacho

libtracker-miner: Add missing ref to SPARQL buffer task

On error paths, we let tracker_sparql_buffer_push_finish() still return
the underlying TrackerTask, together with the error, so we can detach
it properly.

However, in this situation we are not adding an extra task ref, while
the callback expects to own a reference. This causes refcounting issues
and eventually invalid reads.

Fixes: #130
parent 89818c9c
Pipeline #220406 passed with stages
in 5 minutes and 24 seconds
......@@ -522,7 +522,7 @@ tracker_sparql_buffer_push_finish (TrackerSparqlBuffer *buffer,
task = g_task_propagate_pointer (G_TASK (res), error);
if (!task)
task = g_task_get_task_data (G_TASK (res));
task = g_object_ref (g_task_get_task_data (G_TASK (res)));
return task;
}
......
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