perf probe: Release allocated probe_trace_event if failed
authorMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Thu, 16 Jan 2014 09:39:44 +0000 (09:39 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 16 Jan 2014 19:26:50 +0000 (16:26 -0300)
commit981d05adf2e2acc328abb929a6ed3536c0d41c5f
tree0382a51e80b8f2f5db12264ab2964b996c05d51e
parenta7077234d240f16ead29ffeb3cc17ceada50ea5f
perf probe: Release allocated probe_trace_event if failed

To fix a memory leak, release all allocated probe_trace_event on the
error path of try_to_find_probe_trace_events.

Reported-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: "David A. Long" <dave.long@linaro.org>
Cc: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: yrl.pp-manager.tt@hitachi.com
Link: http://lkml.kernel.org/r/20140116093944.24403.30228.stgit@kbuild-fedora.novalocal
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/probe-event.c