From e4d4bbbb722e9214b3ba896be6243a7228f7aba7 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Mon, 26 Jul 2021 23:53:11 +0200 Subject: [PATCH] huawei: plug memleak when processing GETPORTMODE hints ==99766== 96 (24 direct, 72 indirect) bytes in 1 blocks are definitely lost in loss record 3,791 of 4,243 ==99766== at 0x483E7C5: malloc (vg_replace_malloc.c:380) ==99766== by 0x50DCAC9: g_malloc (gmem.c:106) ==99766== by 0x50F46D6: g_slice_alloc (gslice.c:1069) ==99766== by 0x50CE9F2: g_list_insert_sorted_real (glist.c:1109) ==99766== by 0x753DE92: ??? ==99766== by 0x753E6D4: ??? ==99766== by 0x753E897: ??? ==99766== by 0x1F059D: mm_plugin_create_modem (mm-plugin.c:922) ==99766== by 0x166693: mm_device_create_modem (mm-device.c:481) ==99766== by 0x161547: device_support_check_ready (mm-base-manager.c:219) ==99766== by 0x4F03533: g_task_return_now (gtask.c:1219) ==99766== by 0x4F07078: UnknownInlinedFun (gtask.c:1289) ==99766== by 0x4F07078: g_task_return (gtask.c:1245) --- plugins/huawei/mm-plugin-huawei.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/huawei/mm-plugin-huawei.c b/plugins/huawei/mm-plugin-huawei.c index 07652ec7..31ee6274 100644 --- a/plugins/huawei/mm-plugin-huawei.c +++ b/plugins/huawei/mm-plugin-huawei.c @@ -458,6 +458,8 @@ propagate_getportmode_hints (MMPlugin *self, mode_i++; } + g_list_free (tty_probes); + return n_ports_with_hints; }