Commit 8cb12556 authored by Andrii Nakryiko's avatar Andrii Nakryiko Committed by Daniel Borkmann

libbpf: Fix glob_syms memory leak in bpf_linker

glob_syms array wasn't freed on bpf_link__free(). Fix that.

Fixes: a4634922 ("libbpf: Add linker extern resolution support for functions and global variables")
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20211124002325.1737739-6-andrii@kernel.org
parent 2a6a9bf2
...@@ -210,6 +210,7 @@ void bpf_linker__free(struct bpf_linker *linker) ...@@ -210,6 +210,7 @@ void bpf_linker__free(struct bpf_linker *linker)
} }
free(linker->secs); free(linker->secs);
free(linker->glob_syms);
free(linker); free(linker);
} }
......
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