selftests/bpf: fix file resource leak in load_kallsyms
authorPeng Hao <peng.hao2@zte.com.cn>
Thu, 18 Oct 2018 15:18:36 +0000 (23:18 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 1 Dec 2019 08:16:40 +0000 (09:16 +0100)
commita0ec7f6eabe88eb72acfef786c706c453fef6872
tree6d87dd8a5675c30baa39d529abef776735d3e8d9
parent56b8b18321223aa3574856f17457539e8c117726
selftests/bpf: fix file resource leak in load_kallsyms

[ Upstream commit 1bd70d2eba9d90eb787634361f0f6fa2c86b3f6d ]

FILE pointer variable f is opened but never closed.

Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/bpf/trace_helpers.c