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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user