perf tools: Cleanup trace-event-info 'tdata' leak
authorSanskriti Sharma <sansharm@redhat.com>
Tue, 2 Oct 2018 14:29:11 +0000 (10:29 -0400)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 8 Oct 2018 17:23:45 +0000 (14:23 -0300)
commitfaedbf3fd19f2511a39397f76359e4cc6ee93072
tree6728a71d51b15c427bcfa141bf0daa837e7980dc
parentce49d8436cffa9b7a6a5f110879d53e89dbc6746
perf tools: Cleanup trace-event-info 'tdata' leak

Free tracing_data structure in tracing_data_get() error paths.

Fixes the following coverity complaint:

  Error: RESOURCE_LEAK (CWE-772):
  leaked_storage: Variable "tdata" going out of scope leaks the storage

Signed-off-by: Sanskriti Sharma <sansharm@redhat.com>
Reviewed-by: Jiri Olsa <jolsa@kernel.org>
Cc: Joe Lawrence <joe.lawrence@redhat.com>
Link: http://lkml.kernel.org/r/1538490554-8161-3-git-send-email-sansharm@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/trace-event-info.c