Skip to content
Commit 1681566b authored by Andrii Nakryiko's avatar Andrii Nakryiko Committed by Paul Gortmaker
Browse files

libbpf: Fix memory leak/double free issue



commit 3dc5e059 upstream.

Coverity scan against Github libbpf code found the issue of not freeing memory and
leaving already freed memory still referenced from bpf_program. Fix it by
re-assigning successfully reallocated memory sooner.

Fixes: 2993e051 ("tools/bpf: add support to read .BTF.ext sections")
Signed-off-by: default avatarAndrii Nakryiko <andriin@fb.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20191107020855.3834758-2-andriin@fb.com


Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent c4d885b4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment