cinterion: fix double free when loading initial EPS context

The properties object stored in the context is being returned as task
result; so we should make sure that object is no longer left in the
context so that it's not freed twice.

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/395
This commit is contained in:
Aleksander Morgado
2021-06-30 22:31:17 +02:00
parent 12613eac87
commit e1fbc1ccb7

View File

@@ -1686,7 +1686,7 @@ common_load_initial_eps_step (GTask *task)
return;
case COMMON_LOAD_INITIAL_EPS_STEP_LAST:
g_task_return_pointer (task, ctx->properties, g_object_unref);
g_task_return_pointer (task, g_steal_pointer (&ctx->properties), g_object_unref);
g_object_unref (task);
return;