]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Fix func leak in attach_kprobe
authorJiri Olsa <jolsa@redhat.com>
Wed, 21 Jul 2021 21:58:08 +0000 (23:58 +0200)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 23 Jul 2021 03:08:39 +0000 (20:08 -0700)
commit148788e44e6b26c097c72e1c922763006de6a939
treeee345cc538961b595a88067e8ff47f62c6809424
parentd200a1568948d47a2953e6f1342b87c4a35f3e98
libbpf: Fix func leak in attach_kprobe

Add missing free() for func pointer in attach_kprobe function.

Fixes: 70ac62d650f8 ("libbpf: Allow specification of "kprobe/function+offset"")
Reported-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Alan Maguire <alan.maguire@oracle.com>
Tested-by: Alan Maguire <alan.maguire@oracle.com>
Link: https://lore.kernel.org/bpf/20210721215810.889975-2-jolsa@kernel.org
tools/lib/bpf/libbpf.c