tools/resolve_btf_ids: Close ELF file on error
authorAndrii Nakryiko <andrii@kernel.org>
Wed, 24 Nov 2021 00:23:13 +0000 (16:23 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 25 Nov 2021 23:14:06 +0000 (00:14 +0100)
commit1144ab9bdf3430e1b5b3f22741e5283841951add
tree89f729ea7950008cf75cb9680143bf5577ec983b
parent2fe256a429cb6c0b0064563af4158470143a363c
tools/resolve_btf_ids: Close ELF file on error

Fix one case where we don't do explicit clean up.

Fixes: fbbb68de80a4 ("bpf: Add resolve_btfids tool to resolve BTF IDs in ELF object")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20211124002325.1737739-2-andrii@kernel.org
tools/bpf/resolve_btfids/main.c