diff options
| author | Andrii Nakryiko <[email protected]> | 2020-04-29 01:21:04 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2020-04-29 02:48:05 +0000 |
| commit | 229bf8bf4d910510bc1a2fd0b89bd467cd71050d (patch) | |
| tree | cddf013296aff40219e40f654f9c212bd1f070c9 /tools/testing/selftests/bpf/prog_tests/perf_buffer.c | |
| parent | selftests/bpf: Convert test_hashmap into test_progs test (diff) | |
| download | kernel-229bf8bf4d910510bc1a2fd0b89bd467cd71050d.tar.gz kernel-229bf8bf4d910510bc1a2fd0b89bd467cd71050d.zip | |
libbpf: Fix memory leak and possible double-free in hashmap__clear
Fix memory leak in hashmap_clear() not freeing hashmap_entry structs for each
of the remaining entries. Also NULL-out bucket list to prevent possible
double-free between hashmap__clear() and hashmap__free().
Running test_progs-asan flavor clearly showed this problem.
Reported-by: Alston Tang <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/perf_buffer.c')
0 files changed, 0 insertions, 0 deletions
