mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 05:44:11 +00:00
bpftool: Fix wrong free call in do_show_link
The error path frees wrong array, it should be ref_ctr_offsets.
Acked-by: Yafang Shao <laoar.shao@gmail.com>
Reviewed-by: Quentin Monnet <quentin@isovalent.com>
Fixes: a7795698f8
("bpftool: Add support to display uprobe_multi links")
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20240119110505.400573-4-jolsa@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
parent
9fd112b1f8
commit
2adb2e0fcd
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue