Skip to content
Commit 8f4ab7da authored by Miaoqian Lin's avatar Miaoqian Lin Committed by Michael Ellerman
Browse files

selftests/powerpc: Fix resource leaks



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: ebd5858c ("selftests/powerpc: Add test for all DSCR sysfs interfaces")
Signed-off-by: default avatarMiaoqian Lin <linmq006@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221205084429.570654-1-linmq006@gmail.com
parent 6f3a81b6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment