port-probe: unlink the task from probe before completing it
The task completion may try to enqueue a next probe task and in
mm_port_probe_run() it asserts there's no task linked.
https://bugs.freedesktop.org/show_bug.cgi?id=94664
Fixes: 1939c5ace5
This commit is contained in:
committed by
Aleksander Morgado
parent
a0e8505156
commit
8fee9a99f0
+5
-2
@@ -1023,6 +1023,7 @@ static void
|
||||
serial_probe_schedule (MMPortProbe *self)
|
||||
{
|
||||
PortProbeRunContext *ctx;
|
||||
GTask *task;
|
||||
|
||||
g_assert (self->priv->task);
|
||||
ctx = g_task_get_task_data (self->priv->task);
|
||||
@@ -1100,8 +1101,10 @@ serial_probe_schedule (MMPortProbe *self)
|
||||
}
|
||||
|
||||
/* All done! */
|
||||
g_task_return_boolean (self->priv->task, TRUE);
|
||||
g_clear_object (&self->priv->task);
|
||||
task = self->priv->task;
|
||||
self->priv->task = NULL;
|
||||
g_task_return_boolean (task, TRUE);
|
||||
g_object_unref (task);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user