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:
@@ -3626,6 +3626,7 @@ mm_3gpp_parse_pdu_cmgl_response (const gchar *str,
|
|||||||
list = g_list_append (list, info);
|
list = g_list_append (list, info);
|
||||||
g_match_info_next (match_info, &inner_error);
|
g_match_info_next (match_info, &inner_error);
|
||||||
} else {
|
} else {
|
||||||
|
mm_3gpp_pdu_info_free (info);
|
||||||
inner_error = g_error_new (MM_CORE_ERROR,
|
inner_error = g_error_new (MM_CORE_ERROR,
|
||||||
MM_CORE_ERROR_FAILED,
|
MM_CORE_ERROR_FAILED,
|
||||||
"Error parsing +CMGL response: '%s'",
|
"Error parsing +CMGL response: '%s'",
|
||||||
|
Reference in New Issue
Block a user