Skip to content

Commit

Permalink
perf probe: Free perf_probe_event in cleanup_perf_probe_events()
Browse files Browse the repository at this point in the history
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 <wangnan0@huawei.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1441852026-28974-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Namhyung Kim authored and Arnaldo Carvalho de Melo committed Sep 15, 2015
1 parent 9059b28 commit a43aac2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/perf/util/probe-event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit a43aac2

Please sign in to comment.