modem-helpers: fix memory leak in mm_3gpp_parse_pdu_cmgl_response

This patch fixes a potential memory leak in
mm_3gpp_parse_pdu_cmgl_response() where the allocated MM3gppPduInfo may
be leaked when failing to parse the +CMGL response.
This commit is contained in:
Ben Chan
2019-04-03 10:53:01 -07:00
parent 7e4a8d9566
commit 84fe52a1e6

View File

@@ -3626,6 +3626,7 @@ mm_3gpp_parse_pdu_cmgl_response (const gchar *str,
list = g_list_append (list, info);
g_match_info_next (match_info, &inner_error);
} else {
mm_3gpp_pdu_info_free (info);
inner_error = g_error_new (MM_CORE_ERROR,
MM_CORE_ERROR_FAILED,
"Error parsing +CMGL response: '%s'",