aboutsummaryrefslogtreecommitdiff
path: root/plugins/ublox/mm-broadband-modem-ublox.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ublox/mm-broadband-modem-ublox.c')
-rw-r--r--plugins/ublox/mm-broadband-modem-ublox.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/plugins/ublox/mm-broadband-modem-ublox.c b/plugins/ublox/mm-broadband-modem-ublox.c
index b5c2072d..e070b750 100644
--- a/plugins/ublox/mm-broadband-modem-ublox.c
+++ b/plugins/ublox/mm-broadband-modem-ublox.c
@@ -1122,10 +1122,10 @@ static void
ublox_setup_ciev_handler (MMIfaceModem *self,
guint simind_idx)
{
- GRegex *pattern;
- gchar *ciev_regex;
- MMPortSerialAt *primary_port;
- MMPortSerialAt *secondary_port;
+ g_autoptr(GRegex) pattern = NULL;
+ g_autofree gchar *ciev_regex = NULL;
+ MMPortSerialAt *primary_port;
+ MMPortSerialAt *secondary_port;
primary_port = mm_base_modem_peek_port_primary (MM_BASE_MODEM (self));
mm_obj_dbg (self, "setting up simind 'CIEV: %d' events handler", simind_idx);
@@ -1149,9 +1149,6 @@ ublox_setup_ciev_handler (MMIfaceModem *self,
(MMPortSerialAtUnsolicitedMsgFn) ublox_ciev_unsolicited_handler,
self,
NULL);
-
- g_regex_unref (pattern);
- g_free (ciev_regex);
}
static void