From 84fe52a1e6f1521ecc95666c5a17e37a4937b22a Mon Sep 17 00:00:00 2001 From: Ben Chan Date: Wed, 3 Apr 2019 10:53:01 -0700 Subject: 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. --- src/mm-modem-helpers.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/mm-modem-helpers.c b/src/mm-modem-helpers.c index c999637a..cf008d73 100644 --- a/src/mm-modem-helpers.c +++ b/src/mm-modem-helpers.c @@ -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'", -- cgit v1.2.3-70-g09d2