sim-mbim: fix preload_cancellable bug that causes a crash

In merge request !1405, when handling subscriber_ready_status_ready()
fails, it exits early and allows preload retry without resetting
`self->priv->preload_cancellable`. When the preload_subscriber_info() runs
again, it fails at g_assert check and causes a crash.
Before !1405, `self->priv->preload_cancellable` is reset within
application_list_query_ready().

Signed-off-by: Rukun Mao <rmao@google.com>
This commit is contained in:
Rukun Mao
2025-10-15 18:24:19 +00:00
parent a8280207fc
commit 469c686504
+1
View File
@@ -341,6 +341,7 @@ subscriber_ready_status_ready (MbimDevice *device,
if (self->priv->preload_error || ready_state == MBIM_SUBSCRIBER_READY_STATE_NOT_INITIALIZED) {
self->priv->preload = FALSE;
g_clear_object (&self->priv->preload_cancellable);
if (self->priv->preload_error)
g_task_return_error (task, g_steal_pointer (&self->priv->preload_error));
else