All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] selftests: ALSA: fix memory leak in utimer test
@ 2025-07-31 10:02 WangYuli
  2025-07-31 15:02 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: WangYuli @ 2025-07-31 10:02 UTC (permalink / raw)
  To: broonie, perex, tiwai, shuah
  Cc: linux-sound, linux-kselftest, linux-kernel, niecheng1, guanwentao,
	WangYuli, Jun Zhan

Free the malloc'd buffer in TEST_F(timer_f, utimer) to prevent
memory leak.

Reported-by: Jun Zhan <zhanjun@uniontech.com>
Signed-off-by: WangYuli <wangyuli@uniontech.com>
---
 tools/testing/selftests/alsa/utimer-test.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/alsa/utimer-test.c b/tools/testing/selftests/alsa/utimer-test.c
index 32ee3ce57721..37964f311a33 100644
--- a/tools/testing/selftests/alsa/utimer-test.c
+++ b/tools/testing/selftests/alsa/utimer-test.c
@@ -135,6 +135,7 @@ TEST_F(timer_f, utimer) {
 	pthread_join(ticking_thread, NULL);
 	ASSERT_EQ(total_ticks, TICKS_COUNT);
 	pclose(rfp);
+	free(buf);
 }
 
 TEST(wrong_timers_test) {
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-07-31 15:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-31 10:02 [PATCH] selftests: ALSA: fix memory leak in utimer test WangYuli
2025-07-31 15:02 ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.