From a43aac299c3abc09eff856039f5b72166b780d35 Mon Sep 17 00:00:00 2001 From: Namhyung Kim Date: Thu, 10 Sep 2015 11:27:04 +0900 Subject: [PATCH] perf probe: Free perf_probe_event in cleanup_perf_probe_events() The cleanup_perf_probe_events() frees all resources related to a perf probe event. However it only freed resources in trace probe events, not perf probe events. So call clear_perf_probe_event() too. Reported-by: Wang Nan Signed-off-by: Namhyung Kim Acked-by: Masami Hiramatsu Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1441852026-28974-1-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/probe-event.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index 5964eccbe94d..3d7d60cc6f16 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c @@ -2792,6 +2792,7 @@ void cleanup_perf_probe_events(struct perf_probe_event *pevs, int npevs) clear_probe_trace_event(&pevs[i].tevs[j]); zfree(&pevs[i].tevs); pevs[i].ntevs = 0; + clear_perf_probe_event(&pevs[i]); } exit_symbol_maps(); -- 2.20.1