mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
libbpf: Fix glob_syms memory leak in bpf_linker
[ Upstream commit8cb125566c] glob_syms array wasn't freed on bpf_link__free(). Fix that. Fixes:a46349227c("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f8ca67f3fc
commit
9b616ae0bf
@@ -211,6 +211,7 @@ void bpf_linker__free(struct bpf_linker *linker)
|
||||
}
|
||||
free(linker->secs);
|
||||
|
||||
free(linker->glob_syms);
|
||||
free(linker);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user