linux/tools/testing/selftests/powerpc/dscr
Miaoqian Lin b5dd27890c selftests/powerpc: Fix resource leaks
[ Upstream commit 8f4ab7da90 ]

In check_all_cpu_dscr_defaults, opendir() opens the directory stream.
Add missing closedir() in the error path to release it.

In check_cpu_dscr_default, open() creates an open file descriptor.
Add missing close() in the error path to release it.

Fixes: ebd5858c90 ("selftests/powerpc: Add test for all DSCR sysfs interfaces")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221205084429.570654-1-linmq006@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:32:51 +01:00
..
.gitignore
dscr_default_test.c
dscr_explicit_test.c
dscr_inherit_exec_test.c
dscr_inherit_test.c
dscr_sysfs_test.c
dscr_sysfs_thread_test.c
dscr_user_test.c
dscr.h
Makefile
settings