Home
last modified time | relevance | path

Searched hist:"8 f4ab7da" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/tools/testing/selftests/powerpc/dscr/
H A Ddscr_sysfs_test.c8f4ab7da Mon Dec 05 02:44:27 CST 2022 Miaoqian Lin <linmq006@gmail.com> 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: ebd5858c904b ("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