]> git.baikalelectronics.ru Git - kernel.git/commit
perf metric: Fix some memory leaks - part 2
authorNamhyung Kim <namhyung@kernel.org>
Tue, 15 Sep 2020 03:18:10 +0000 (12:18 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 15 Sep 2020 11:58:44 +0000 (08:58 -0300)
commit874e952a5ea11daf120f4a498f450af38774bd57
tree2488717448d1fcd646d090b8eee0369418b31256
parent1a176427fd5bcf5ddff2c5b0ebc96687b7913ba9
perf metric: Fix some memory leaks - part 2

The metric_event_delete() missed to free expr->metric_events and it
should free an expr when metric_refs allocation failed.

Fixes: 0ab76c0180d00 ("perf metric: Collect referenced metrics in struct metric_expr")
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: John Garry <john.garry@huawei.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20200915031819.386559-3-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/metricgroup.c