cinterion: fix heap double-free during GPS location disablement

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/work_items/1077

Signed-off-by: Aleksander Morgado <aleksandermj@google.com>
This commit is contained in:
Aleksander Morgado
2026-07-13 11:22:25 +00:00
parent 8b77e71298
commit 5bb7ece8b4
+2 -4
View File
@@ -650,11 +650,9 @@ disable_location_gathering_context_gps_step (GTask *task)
}
if (ctx->sgpss_error) {
g_task_return_error (task, ctx->sgpss_error);
g_clear_error (&ctx->sgpss_error);
g_task_return_error (task, g_steal_pointer (&ctx->sgpss_error));
} else if (ctx->sgpsc_error) {
g_task_return_error (task, ctx->sgpsc_error);
g_clear_error (&ctx->sgpsc_error);
g_task_return_error (task, g_steal_pointer (&ctx->sgpsc_error));
} else {
priv->enabled_sources &= ~ctx->source;
g_task_return_boolean (task, TRUE);