summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Chan <benchan@chromium.org>2014-08-11 19:42:38 (GMT)
committerAleksander Morgado <aleksander@aleksander.es>2014-08-12 07:45:50 (GMT)
commit46696114124d1a69cd3d90ba83abff36014a7326 (patch)
treebd0f8277a13310f5fa1ab53404e798608524ab9b
parentda933468c81d45fa1eb8a80b926b5fe06876ebef (diff)
broadband-modem,plugins: fix GMatchInfo leaksHEADmaster
-rw-r--r--plugins/huawei/mm-broadband-modem-huawei.c2
-rw-r--r--plugins/mtk/mm-broadband-modem-mtk.c5
-rw-r--r--plugins/novatel/mm-broadband-modem-novatel.c1
-rw-r--r--plugins/x22x/mm-broadband-modem-x22x.c1
-rw-r--r--src/mm-broadband-modem.c1
5 files changed, 8 insertions, 2 deletions
diff --git a/plugins/huawei/mm-broadband-modem-huawei.c b/plugins/huawei/mm-broadband-modem-huawei.c
index 400049d..ce1fb6f 100644
--- a/plugins/huawei/mm-broadband-modem-huawei.c
+++ b/plugins/huawei/mm-broadband-modem-huawei.c
@@ -634,6 +634,8 @@ load_unlock_retries_finish (MMIfaceModem *self,
MM_CORE_ERROR_FAILED,
"Could not parse ^CPIN results: Response didn't match (%s)",
result);
+
+ g_match_info_free (match_info);
g_regex_unref (r);
return NULL;
}
diff --git a/plugins/mtk/mm-broadband-modem-mtk.c b/plugins/mtk/mm-broadband-modem-mtk.c
index 63b37ac..df90046 100644
--- a/plugins/mtk/mm-broadband-modem-mtk.c
+++ b/plugins/mtk/mm-broadband-modem-mtk.c
@@ -218,7 +218,7 @@ get_supported_modes_ready (MMBaseModem *self,
G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
g_assert (r != NULL);
- if(!g_regex_match_full (r, response, strlen (response), 0, 0, &match_info, &match_error)) {
+ if (!g_regex_match_full (r, response, strlen (response), 0, 0, &match_info, &match_error)) {
if (match_error) {
g_propagate_error (&error, match_error);
} else {
@@ -228,8 +228,9 @@ get_supported_modes_ready (MMBaseModem *self,
"Failed to match EGMR response: %s", response);
}
+ g_match_info_free (match_info);
g_regex_unref (r);
- return;
+ return;
}
if (!mm_get_int_from_match_info (match_info, 1, &device_type)) {
diff --git a/plugins/novatel/mm-broadband-modem-novatel.c b/plugins/novatel/mm-broadband-modem-novatel.c
index e4b6b6a..765595e 100644
--- a/plugins/novatel/mm-broadband-modem-novatel.c
+++ b/plugins/novatel/mm-broadband-modem-novatel.c
@@ -195,6 +195,7 @@ nwrat_query_ready (MMBaseModem *self,
response);
g_simple_async_result_complete (simple);
g_object_unref (simple);
+ g_match_info_free (match_info);
g_regex_unref (r);
return;
}
diff --git a/plugins/x22x/mm-broadband-modem-x22x.c b/plugins/x22x/mm-broadband-modem-x22x.c
index 0cfccb4..ee611f2 100644
--- a/plugins/x22x/mm-broadband-modem-x22x.c
+++ b/plugins/x22x/mm-broadband-modem-x22x.c
@@ -145,6 +145,7 @@ load_current_modes_finish (MMIfaceModem *self,
"Couldn't match +SYSSEL reply: %s", response);
}
+ g_match_info_free (match_info);
g_regex_unref (r);
return FALSE;
}
diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c
index 93be6a5..17c128c 100644
--- a/src/mm-broadband-modem.c
+++ b/src/mm-broadband-modem.c
@@ -5981,6 +5981,7 @@ sms_text_part_list_ready (MMBroadbandModem *self,
MM_CORE_ERROR_INVALID_ARGS,
"Couldn't parse SMS list response");
list_parts_context_complete_and_free (ctx);
+ g_match_info_free (match_info);
g_regex_unref (r);
return;
}