diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2021-11-23 16:23:17 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-01-27 12:01:34 +0100 |
commit | 4485f09a46dab6b0482ca3dd4b4fc1fe0906cf0c (patch) | |
tree | d27b0cdba6ad7984bc44be991126457000913cf6 /tools | |
parent | 05e7801383c3b8b252b59a20e88618c5b420ef2b (diff) |
libbpf: Fix glob_syms memory leak in bpf_linker
[ Upstream commit 8cb125566c40b7141d8842c534f0ea5820ee3d5c ]
glob_syms array wasn't freed on bpf_link__free(). Fix that.
Fixes: a46349227cd8 ("libbpf: Add linker extern resolution support for functions and global variables")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20211124002325.1737739-6-andrii@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lib/bpf/linker.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/lib/bpf/linker.c b/tools/lib/bpf/linker.c index f677dccdeae4..94bdd9785928 100644 --- a/tools/lib/bpf/linker.c +++ b/tools/lib/bpf/linker.c @@ -210,6 +210,7 @@ void bpf_linker__free(struct bpf_linker *linker) } free(linker->secs); + free(linker->glob_syms); free(linker); } |