perf probe: Free perf_probe_event in cleanup_perf_probe_events()
authorNamhyung Kim <namhyung@kernel.org>
Thu, 10 Sep 2015 02:27:04 +0000 (11:27 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 15 Sep 2015 12:48:32 +0000 (09:48 -0300)
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>
tools/perf/util/probe-event.c

index 5964eccbe94d68b5fb0906e82f7069e34253b673..3d7d60cc6f162ba95ff3c43f676294dbc3739bde 100644 (file)
@@ -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();