perf metric: Fix memory leaks
authorIan Rogers <irogers@google.com>
Sun, 7 Nov 2021 09:00:02 +0000 (01:00 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sun, 7 Nov 2021 18:39:28 +0000 (15:39 -0300)
commitaba8c5e38075fa0e0a5463b73b0788f71bb4c78d
tree538f08e97f8dd72dc08933ac453f139ee4d7ef56
parent07eafd4e053a41d72611848b8758df0752b53ee4
perf metric: Fix memory leaks

Certain error paths may leak memory as caught by address sanitizer.
Ensure this is cleaned up to make sure address/leak sanitizer is happy.

Fixes: 5ecd5a0c7d1cca79 ("perf metrics: Modify setup and deduplication")
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: John Garry <john.garry@huawei.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20211107090002.3784612-3-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/metricgroup.c