]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Nov 2021 10:04:17 +0000 (11:04 +0100)
commitaf1d4c7c44a9dd80c2bb5a5e0199551d4209f5e6
tree7fd47738762543d064e520db70db96370d13f89d
parenta75f4f978babbdc3550fb28e9b20a823fdf73356
selftests/bpf: Fix memory leak in test_ima

[ Upstream commit efadf2ad17a2d5dc90bda4e6e8b2f96af4c62dae ]

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

Fixes: f446b570ac7e ("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
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/bpf/prog_tests/test_ima.c