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) {