aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSahid Orentino Ferdjaoui <[email protected]>2022-11-20 11:26:43 +0000
committerAlexei Starovoitov <[email protected]>2022-11-20 16:17:46 -0800
commit52df1a8aabadeba1e4c2fe157784637ddec76301 (patch)
tree485001b6e4ef11db75fb1a4bd2e896bbb8742fe9
parentd1313e01271d2d8f33d6c82f1afb77e820a3540d (diff)
bpftool: remove function free_btf_vmlinux()
The function contains a single btf__free() call which can be inlined. Credits to Yonghong Song. Signed-off-by: Sahid Orentino Ferdjaoui <[email protected]> Acked-by: Yonghong Song <[email protected]> Suggested-by: Yonghong Song <[email protected]> Reviewed-by: Quentin Monnet <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
-rw-r--r--tools/bpf/bpftool/map.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftool/map.c
index eb362bd3d2c9..88911d3aa2d9 100644
--- a/tools/bpf/bpftool/map.c
+++ b/tools/bpf/bpftool/map.c
@@ -811,11 +811,6 @@ static void free_map_kv_btf(struct btf *btf)
btf__free(btf);
}
-static void free_btf_vmlinux(void)
-{
- btf__free(btf_vmlinux);
-}
-
static int
map_dump(int fd, struct bpf_map_info *info, json_writer_t *wtr,
bool show_header)
@@ -952,7 +947,7 @@ exit_close:
close(fds[i]);
exit_free:
free(fds);
- free_btf_vmlinux();
+ btf__free(btf_vmlinux);
return err;
}