Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Ian Rogers and committed by
Namhyung Kim
874fa827 ccc60dce

+4
+4
tools/perf/builtin-trace.c
··· 5339 5339 zfree(&trace->syscalls.table); 5340 5340 } 5341 5341 zfree(&trace->perfconfig_events); 5342 + #ifdef HAVE_LIBBPF_SUPPORT 5343 + btf__free(trace->btf); 5344 + trace->btf = NULL; 5345 + #endif 5342 5346 } 5343 5347 5344 5348 #ifdef HAVE_BPF_SKEL