diff options
| author | Josh Law <objecting@objecting.org> | 2026-03-19 08:43:06 +0900 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-03-25 11:06:10 +0100 |
| commit | 2cf5eff223fc9b720690c16ab763a00788e85c4b (patch) | |
| tree | f0abcb6be86d43c3f66ce300303318e93bb3c547 /kernel/bpf/arraymap.c | |
| parent | c1bfc25d62d83160799bd731bcce5d6ab8dfd2a0 (diff) | |
tools/bootconfig: fix fd leak in load_xbc_file() on fstat failure
[ Upstream commit 3b2c2ab4ceb82af484310c3087541eab00ea288b ]
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: 950313ebf79c ("tools: bootconfig: Add bootconfig command")
Signed-off-by: Josh Law <objecting@objecting.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'kernel/bpf/arraymap.c')
0 files changed, 0 insertions, 0 deletions
