aboutsummaryrefslogtreecommitdiff
path: root/plugins/mm-modem-zte.c
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2014-02-05 08:38:27 +0100
committerGuido Günther <agx@sigxcpu.org>2014-02-05 08:38:27 +0100
commit14d771b90f5a7d3887e5e900d1fb4737477ad305 (patch)
treef382e3359d20916ae60d28361e59635e373224f8 /plugins/mm-modem-zte.c
parenta09050a7f63a262bf90dcb1c7a41f9cfd205db43 (diff)
Imported Upstream version 0.5.2.0upstream/0.5.2.0
Diffstat (limited to 'plugins/mm-modem-zte.c')
-rw-r--r--plugins/mm-modem-zte.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/mm-modem-zte.c b/plugins/mm-modem-zte.c
index 6c9f395..88ef734 100644
--- a/plugins/mm-modem-zte.c
+++ b/plugins/mm-modem-zte.c
@@ -105,7 +105,7 @@ get_allowed_mode_done (MMAtSerialPort *port,
{
MMCallbackInfo *info = (MMCallbackInfo *) user_data;
GRegex *r = NULL;
- GMatchInfo *match_info;
+ GMatchInfo *match_info = NULL;
/* If the modem has already been removed, return without
* scheduling callback */
@@ -138,8 +138,6 @@ get_allowed_mode_done (MMAtSerialPort *port,
pref_acq = atoi (str);
g_free (str);
- g_match_info_free (match_info);
-
if (cm_mode < 0 || cm_mode > 2 || pref_acq < 0 || pref_acq > 2) {
info->error = g_error_new (MM_MODEM_ERROR,
MM_MODEM_ERROR_GENERAL,
@@ -164,6 +162,8 @@ get_allowed_mode_done (MMAtSerialPort *port,
}
done:
+ if (match_info)
+ g_match_info_free (match_info);
if (r)
g_regex_unref (r);
mm_callback_info_schedule (info);