libbpf: fix memory leak in strset
PATCH 1/1 libbpf: fix memory leak in strset
From: Andrii Nakryiko <[email protected]>
Free struct strset itself, not just its internal parts.
Fixes 90d76d3ececc ("libbpf: Extract internal set-of-strings datastructure APIs")
Signed-off-by Andrii Nakryiko <[email protected]>
--- tools/lib/bpf/strset.c | 1 + 1 file changed, 1 insertion(+)
tools/lib/bpf/strset.c +1 -0
@@ -88,6 +88,7 @@ void strset__free(struct strset *set)hashmap__free (set->strs_hash);free (set->strs_data); +free (set); }size_t strset__data_size (const struct strset *set)
Signature · 1 line
2.30.2
Quoted 3 lines · On Fri, Oct 01, 2021 at 11:59:10AM -0700, [email protected] wrote:
From: Andrii Nakryiko <[email protected]>
Free struct strset itself, not just its internal parts.
Acked-by Martin KaFai Lau <[email protected]>
This patch was applied to bpf/bpf.git (refs/heads/master):
Hello:
This patch was applied to bpf/bpf.git (refs/heads/master):
Quoted 8 lines · On Fri, 1 Oct 2021 11:59:10 -0700 you wrote:
From: Andrii Nakryiko <[email protected]>
Free struct strset itself, not just its internal parts.
Fixes 90d76d3ececc ("libbpf: Extract internal set-of-strings datastructure APIs")Signed-off-by Andrii Nakryiko <[email protected]>[...]
Here is the summary with links:
- [bpf] libbpf: fix memory leak in strset
https://git.kernel.org/bpf/bpf/c/b0e875bac0fa
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html