broadband-modem,plugins: fix GMatchInfo leaks
This commit is contained in:
committed by
Aleksander Morgado
parent
da933468c8
commit
4669611412
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user