mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
bpf: libbpf: fix memleak by freeing line_info
This patch fixes a memory leak in libbpf by freeing up line_info
member of struct bpf_program while unloading a program.
Fixes: 3d65014146 ("bpf: libbpf: Add btf_line_info support to libbpf")
Signed-off-by: Prashant Bhole <[email protected]>
Acked-by: Martin KaFai Lau <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
This commit is contained in:
parent
37c7b1caea
commit
07a09d1b73
1 changed files with 1 additions and 0 deletions
|
|
@ -266,6 +266,7 @@ void bpf_program__unload(struct bpf_program *prog)
|
|||
|
||||
zclose(prog->btf_fd);
|
||||
zfree(&prog->func_info);
|
||||
zfree(&prog->line_info);
|
||||
}
|
||||
|
||||
static void bpf_program__exit(struct bpf_program *prog)
|
||||
|
|
|
|||
Loading…
Reference in a new issue