* [PATCH] qmimodem: Fix error path memory leak in gobi
@ 2024-05-07 15:33 Steve Schrock
2024-05-07 16:30 ` patchwork-bot+ofono
0 siblings, 1 reply; 2+ messages in thread
From: Steve Schrock @ 2024-05-07 15:33 UTC (permalink / raw)
To: ofono; +Cc: Steve Schrock
I noticed this leak when I terminated ofonod while gobi was retrying
discovery on an unresponsive QMUX device.
==8257== 20 (16 direct, 4 indirect) bytes in 1 blocks are definitely lost in loss record 31 of 154
==8257== at 0x4885118: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so)
==8257== by 0x5A4737: l_malloc (util.c:49)
==8257== by 0x4669E3: qmi_param_new (qmi.c:2374)
==8257== by 0x466D73: qmi_param_new_uint8 (qmi.c:2449)
==8257== by 0x47D717: gobi_disable (gobi.c:482)
==8257== by 0x51BAD7: set_powered (modem.c:986)
==8257== by 0x51E8FB: __ofono_modem_shutdown (modem.c:2279)
==8257== by 0x518233: signal_handler (main.c:85)
==8257== by 0x496D14F: ??? (in /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0.7800.0)
==8257== by 0x49CDE47: ??? (in /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0.7800.0)
==8257== by 0x496DBFF: g_main_loop_run (in /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0.7800.0)
==8257== by 0x518A23: main (main.c:314)
---
plugins/gobi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/plugins/gobi.c b/plugins/gobi.c
index 39c1ab81fa56..8bd2c4060446 100644
--- a/plugins/gobi.c
+++ b/plugins/gobi.c
@@ -488,6 +488,7 @@ static int gobi_disable(struct ofono_modem *modem)
power_disable_cb, modem, NULL) > 0)
return -EINPROGRESS;
+ qmi_param_free(param);
out:
shutdown_device(modem);
--
2.43.2
--
*Confidentiality Note:* We care about protecting our proprietary
information, confidential material, and trade secrets. This message may
contain some or all of those things. Cruise will suffer material harm if
anyone other than the intended recipient disseminates or takes any action
based on this message. If you have received this message (including any
attachments) in error, please delete it immediately and notify the sender
promptly.
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] qmimodem: Fix error path memory leak in gobi
2024-05-07 15:33 [PATCH] qmimodem: Fix error path memory leak in gobi Steve Schrock
@ 2024-05-07 16:30 ` patchwork-bot+ofono
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+ofono @ 2024-05-07 16:30 UTC (permalink / raw)
To: Steve Schrock; +Cc: ofono
Hello:
This patch was applied to ofono.git (master)
by Denis Kenzior <denkenz@gmail.com>:
On Tue, 7 May 2024 10:33:58 -0500 you wrote:
> I noticed this leak when I terminated ofonod while gobi was retrying
> discovery on an unresponsive QMUX device.
>
> ==8257== 20 (16 direct, 4 indirect) bytes in 1 blocks are definitely lost in loss record 31 of 154
> ==8257== at 0x4885118: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so)
> ==8257== by 0x5A4737: l_malloc (util.c:49)
> ==8257== by 0x4669E3: qmi_param_new (qmi.c:2374)
> ==8257== by 0x466D73: qmi_param_new_uint8 (qmi.c:2449)
> ==8257== by 0x47D717: gobi_disable (gobi.c:482)
> ==8257== by 0x51BAD7: set_powered (modem.c:986)
> ==8257== by 0x51E8FB: __ofono_modem_shutdown (modem.c:2279)
> ==8257== by 0x518233: signal_handler (main.c:85)
> ==8257== by 0x496D14F: ??? (in /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0.7800.0)
> ==8257== by 0x49CDE47: ??? (in /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0.7800.0)
> ==8257== by 0x496DBFF: g_main_loop_run (in /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0.7800.0)
> ==8257== by 0x518A23: main (main.c:314)
>
> [...]
Here is the summary with links:
- qmimodem: Fix error path memory leak in gobi
https://git.kernel.org/pub/scm/network/ofono/ofono.git/?id=d5d99ff50355
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-05-07 16:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-07 15:33 [PATCH] qmimodem: Fix error path memory leak in gobi Steve Schrock
2024-05-07 16:30 ` patchwork-bot+ofono
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox