Skip to content

Commit 6260da0

Browse files
WangYulitiwai
authored andcommitted
selftests: ALSA: fix memory leak in utimer test
Free the malloc'd buffer in TEST_F(timer_f, utimer) to prevent memory leak. Fixes: 1026392 ("selftests: ALSA: Cover userspace-driven timers with test") Reported-by: Jun Zhan <zhanjun@uniontech.com> Signed-off-by: WangYuli <wangyuli@uniontech.com> Link: https://patch.msgid.link/DE4D931FCF54F3DB+20250731100222.65748-1-wangyuli@uniontech.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent e9df175 commit 6260da0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

tools/testing/selftests/alsa/utimer-test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ TEST_F(timer_f, utimer) {
135135
pthread_join(ticking_thread, NULL);
136136
ASSERT_EQ(total_ticks, TICKS_COUNT);
137137
pclose(rfp);
138+
free(buf);
138139
}
139140

140141
TEST(wrong_timers_test) {

0 commit comments

Comments
 (0)