]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/bpf: Fix memory leaks in tests
authorIhor Solodrai <ihor.solodrai@linux.dev>
Mon, 23 Feb 2026 19:07:26 +0000 (11:07 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 24 Feb 2026 16:19:49 +0000 (08:19 -0800)
commit9d0272c91fbc3ae86f2c3b6ba0a0b0ee77d862e3
treef9be1ccdbaad73a8bd767e241d08a390d3a4db63
parenta1a771bd649212ef32cf9b0bcc63213a762d354a
selftests/bpf: Fix memory leaks in tests

Fix trivial memory leaks detected by userspace ASAN:
  - htab_update: free value buffer in test_reenter_update cleanup
  - test_xsk: inline pkt_stream_replace() in testapp_stats_rx_full()
    and testapp_stats_fill_empty()
  - testing_helpers: free buffer allocated by getline() in
    parse_test_list_file

Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Link: https://lore.kernel.org/r/20260223190736.649171-11-ihor.solodrai@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/htab_update.c
tools/testing/selftests/bpf/prog_tests/test_xsk.c
tools/testing/selftests/bpf/testing_helpers.c