projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a6a9bf
)
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
Daniel Borkmann
<daniel@iogearbox.net>
Thu, 25 Nov 2021 23:15:02 +0000
(
00:15
+0100)
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
tools/lib/bpf/linker.c
patch
|
blob
|
blame
|
history
diff --git
a/tools/lib/bpf/linker.c
b/tools/lib/bpf/linker.c
index 594b206fa674a133e3abaec82be1b74f87888cfc..3e1b2a15fdc74c90a38298e539f0ad9380c1391a 100644
(file)
--- 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);
}