lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <DE4D931FCF54F3DB+20250731100222.65748-1-wangyuli@uniontech.com>
Date: Thu, 31 Jul 2025 18:02:22 +0800
From: WangYuli <wangyuli@...ontech.com>
To: broonie@...nel.org,
	perex@...ex.cz,
	tiwai@...e.com,
	shuah@...nel.org
Cc: linux-sound@...r.kernel.org,
	linux-kselftest@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	niecheng1@...ontech.com,
	guanwentao@...ontech.com,
	WangYuli <wangyuli@...ontech.com>,
	Jun Zhan <zhanjun@...ontech.com>
Subject: [PATCH] selftests: ALSA: fix memory leak in utimer test

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

Reported-by: Jun Zhan <zhanjun@...ontech.com>
Signed-off-by: WangYuli <wangyuli@...ontech.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ