core: remove unnecessary NULL checks for g_match_info_free()

g_match_info_free() already check if the given pointer is NULL and does
nothing on a NULL pointer.
This commit is contained in:
Ben Chan
2018-10-17 23:06:48 -07:00
committed by Aleksander Morgado
parent 749b806c30
commit 7de6b6f2e1
12 changed files with 40 additions and 85 deletions

View File

@@ -727,8 +727,7 @@ selrat_query_ready (MMBaseModem *self,
"Could not parse allowed mode response: Response didn't match: '%s'",
response);
if (match_info)
g_match_info_free (match_info);
g_match_info_free (match_info);
g_regex_unref (r);
if (error) {
@@ -1382,8 +1381,7 @@ parse_time (const gchar *response,
}
}
if (match_info)
g_match_info_free (match_info);
g_match_info_free (match_info);
g_regex_unref (r);
return result;
}

View File

@@ -67,8 +67,7 @@ mm_sierra_parse_scact_read_response (const gchar *reply,
g_match_info_next (match_info, &inner_error);
}
if (match_info)
g_match_info_free (match_info);
g_match_info_free (match_info);
g_regex_unref (r);
if (inner_error) {