projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f8ca67f
)
libbpf: Fix glob_syms memory leak in bpf_linker
author
Andrii Nakryiko
<andrii@kernel.org>
Wed, 24 Nov 2021 00:23:17 +0000
(16:23 -0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:03:16 +0000
(11:03 +0100)
[ 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>
tools/lib/bpf/linker.c
patch
|
blob
|
history
diff --git
a/tools/lib/bpf/linker.c
b/tools/lib/bpf/linker.c
index 2df880cefdaeea1ff93b00134a7fcc6971939656..84095a2c2ef2a9a8761d8de05bc8ae8757af63d5 100644
(file)
--- a/
tools/lib/bpf/linker.c
+++ b/
tools/lib/bpf/linker.c
@@
-211,6
+211,7
@@
void bpf_linker__free(struct bpf_linker *linker)
}
free(linker->secs);
+ free(linker->glob_syms);
free(linker);
}