mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 08:02:27 +02:00
perf trace: Fix BTF memory leak
Add missing btf__free in trace__exit. Signed-off-by: Ian Rogers <irogers@google.com> Reviewed-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Arnaldo Carvalho de Melo <acme@kernel.org> Link: https://lore.kernel.org/r/20250319050741.269828-14-irogers@google.com Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
parent
ccc60dce3e
commit
874fa827df
|
|
@ -5339,6 +5339,10 @@ static void trace__exit(struct trace *trace)
|
|||
zfree(&trace->syscalls.table);
|
||||
}
|
||||
zfree(&trace->perfconfig_events);
|
||||
#ifdef HAVE_LIBBPF_SUPPORT
|
||||
btf__free(trace->btf);
|
||||
trace->btf = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_BPF_SKEL
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user