diff options
| author | Andrii Nakryiko <[email protected]> | 2021-11-24 00:23:17 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2021-11-25 23:15:02 +0000 |
| commit | 8cb125566c40b7141d8842c534f0ea5820ee3d5c (patch) | |
| tree | 094fa644157c8b05f23f092e8b611f4caef9e089 /tools/lib/bpf/linker.c | |
| parent | libbpf: Don't call libc APIs with NULL pointers (diff) | |
| download | kernel-8cb125566c40b7141d8842c534f0ea5820ee3d5c.tar.gz kernel-8cb125566c40b7141d8842c534f0ea5820ee3d5c.zip | |
libbpf: Fix glob_syms memory leak in bpf_linker
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 <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/lib/bpf/linker.c')
| -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 594b206fa674..3e1b2a15fdc7 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); } |
