Files
linux/tools/testing/selftests
Miaoqian Lin 81a61f3396 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>
2023-01-07 12:07:29 +01:00
..
2015-09-22 15:09:53 -07:00
2016-01-07 13:38:11 -07:00
2015-03-13 15:21:56 -06:00
2015-05-26 15:58:08 -06:00