selftests: ALSA: fix memory leak in utimer test
Subsystems (3)
PATCH 1/1 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 <[email protected]>
Signed-off-by WangYuli <[email protected]>
--- tools/testing/selftests/alsa/utimer-test.c | 1 + 1 file changed, 1 insertion(+)
tools/testing/selftests/alsa/utimer-test.c +1 -0
@@ -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) {
Signature · 1 line
2.50.1
Takashi Iwai
AppliedQuoted 6 lines · WangYuli
Free the malloc'd buffer in
TEST_F(timer_f, utimer)to prevent memory leak.Reported-by Jun Zhan <[email protected]>Signed-off-by WangYuli <[email protected]>
Thanks, applied now. I added Fixes tag in my side.
Takashi
Quoted 19 lines
--- tools/testing/selftests/alsa/utimer-test.c | 1 + 1 file changed, 1 insertion(+)tools/testing/selftests/alsa/utimer-test.c +1
-0@@ -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) {Signature · 1 line
2.50.1