]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Fix memleak in aux->func_info and aux->btf
authorMartin KaFai Lau <kafai@fb.com>
Sun, 2 Dec 2018 01:08:44 +0000 (17:08 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 2 Dec 2018 17:12:58 +0000 (09:12 -0800)
commit73386d2c728fea8d7c6dfe9f6a0c7f274a472ece
tree4a6563610f69436aa35887e450992e7fb8a941d9
parentd94825dc761a24da5a68c7f04c248e5bf6120647
bpf: Fix memleak in aux->func_info and aux->btf

The aux->func_info and aux->btf are leaked in the error out cases
during bpf_prog_load().  This patch fixes it.

Fixes: 2821b34950ef ("bpf: btf: support proper non-jit func info")
Cc: Yonghong Song <yhs@fb.com>
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/syscall.c