Commit 2adb2e0f authored by Jiri Olsa's avatar Jiri Olsa Committed by Alexei Starovoitov

bpftool: Fix wrong free call in do_show_link

The error path frees wrong array, it should be ref_ctr_offsets.
Acked-by: default avatarYafang Shao <laoar.shao@gmail.com>
Reviewed-by: default avatarQuentin Monnet <quentin@isovalent.com>
Fixes: a7795698 ("bpftool: Add support to display uprobe_multi links")
Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
Acked-by: default avatarSong Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20240119110505.400573-4-jolsa@kernel.orgSigned-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 9fd112b1
......@@ -977,7 +977,7 @@ static int do_show_link(int fd)
cookies = calloc(count, sizeof(__u64));
if (!cookies) {
p_err("mem alloc failed");
free(cookies);
free(ref_ctr_offsets);
free(offsets);
close(fd);
return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment