Skip to content

gs-metered: Count all references to task in block_scheduler_schedule_cb

In block_scheduler_schedule_cb, a GCancellable::cancelled signal handler was connected to a tasks's cancellable, with a pointer to the task itself as data. However, this was done without incrementing the reference count for the task, resulting in an error due to the task being prematurely freed when g_cancellable_disconnect was called.

In addition to resolving that, we will change block_check_cb to increment the task's reference count while it is in use.

Closes #2516 (closed)


This is a backport of !1966 (merged).

Merge request reports