diff options
author | Ben Chan <benchan@chromium.org> | 2014-08-11 12:42:38 -0700 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2014-08-12 09:45:50 +0200 |
commit | 46696114124d1a69cd3d90ba83abff36014a7326 (patch) | |
tree | bd0f8277a13310f5fa1ab53404e798608524ab9b | |
parent | da933468c81d45fa1eb8a80b926b5fe06876ebef (diff) |
broadband-modem,plugins: fix GMatchInfo leaks
-rw-r--r-- | plugins/huawei/mm-broadband-modem-huawei.c | 2 | ||||
-rw-r--r-- | plugins/mtk/mm-broadband-modem-mtk.c | 5 | ||||
-rw-r--r-- | plugins/novatel/mm-broadband-modem-novatel.c | 1 | ||||
-rw-r--r-- | plugins/x22x/mm-broadband-modem-x22x.c | 1 | ||||
-rw-r--r-- | src/mm-broadband-modem.c | 1 |
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 400049da..ce1fb6fd 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 63b37ac6..df900463 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 e4b6b6af..765595e3 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 0cfccb4e..ee611f2c 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 93be6a5d..17c128ce 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; } |