]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Fix memory leak in test_ima
authorKumar Kartikeya Dwivedi <memxor@gmail.com>
Thu, 28 Oct 2021 06:35:01 +0000 (12:05 +0530)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 28 Oct 2021 23:30:07 +0000 (16:30 -0700)
commit8df3929f940fe134a8a9b94812abae248b28ac52
treee3c7139b738cff0dba0392dd7bcadc558398abcd
parentd1556c55c4269e687ce957e626547db809c6ae14
selftests/bpf: Fix memory leak in test_ima

The allocated ring buffer is never freed, do so in the cleanup path.

Fixes: 0c4a7a7bdd11 ("bpf/selftests: Update the IMA test to use BPF ring buffer")
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20211028063501.2239335-9-memxor@gmail.com
tools/testing/selftests/bpf/prog_tests/test_ima.c