aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2021-06-30 22:31:17 +0200
committerAleksander Morgado <aleksander@aleksander.es>2021-06-30 22:31:17 +0200
commite1fbc1ccb74ba9c788d88c5f19fb89200a6478f6 (patch)
tree413253f2cb31d542b96f92d2d36f06209ac8cd47
parent12613eac8791fb70b9fe45eb07440c559cc1e198 (diff)
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
-rw-r--r--plugins/cinterion/mm-broadband-modem-cinterion.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/cinterion/mm-broadband-modem-cinterion.c b/plugins/cinterion/mm-broadband-modem-cinterion.c
index 1e2651d0..12187164 100644
--- a/plugins/cinterion/mm-broadband-modem-cinterion.c
+++ b/plugins/cinterion/mm-broadband-modem-cinterion.c
@@ -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;