linux/tools/bootconfig
Josh Law 3b2c2ab4ce tools/bootconfig: fix fd leak in load_xbc_file() on fstat failure
If fstat() fails after open() succeeds, the function returns without
closing the file descriptor. Also preserve errno across close(), since
close() may overwrite it before the error is returned.

Link: https://lore.kernel.org/all/20260318155847.78065-3-objecting@objecting.org/

Fixes: 950313ebf7 ("tools: bootconfig: Add bootconfig command")
Signed-off-by: Josh Law <objecting@objecting.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
2026-03-19 08:43:06 +09:00
..
include/linux
samples bootconfig: Add bootconfig tests about braces 2026-03-13 17:49:30 +09:00
scripts tools/bootconfig: scripts/ftrace.sh was missing the shebang line, so added it 2025-07-24 00:23:39 +09:00
.gitignore
Makefile tools/bootconfig: specify LDFLAGS as an argument to CC 2025-05-16 11:22:54 +09:00
main.c tools/bootconfig: fix fd leak in load_xbc_file() on fstat failure 2026-03-19 08:43:06 +09:00
test-bootconfig.sh bootconfig: Add bootconfig tests about braces 2026-03-13 17:49:30 +09:00