From 7c5e27caf96b777c8fd5f8bfdd612346ef1957b4 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Sun, 23 May 2021 14:15:30 +0200 Subject: [PATCH] iface-modem-3gpp: fix double GError free on registration sync failure --- src/mm-iface-modem-3gpp.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/mm-iface-modem-3gpp.c b/src/mm-iface-modem-3gpp.c index 2a063996..aa6b277a 100644 --- a/src/mm-iface-modem-3gpp.c +++ b/src/mm-iface-modem-3gpp.c @@ -2587,11 +2587,8 @@ sync_registration_ready (MMIfaceModem3gpp *self, ctx = g_task_get_task_data (task); - mm_iface_modem_3gpp_run_registration_checks_finish (self, res, &error); - if (error) { - mm_obj_dbg (self, "Synchronizing 3GPP registration failed: %s", error->message); - g_error_free (error); - } + if (!mm_iface_modem_3gpp_run_registration_checks_finish (self, res, &error)) + mm_obj_dbg (self, "couldn't synchronize 3GPP registration: %s", error->message); /* Go on to next step */ ctx->step++;