]> 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)
commit3e23c0c8dc0a72ab28426fc7439d66c3f2b9e7b8
tree2488717448d1fcd646d090b8eee0369418b31256
parentfde2ad31281c7645bc0e5f102c69c564a14257c8
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: 8c9203f61e4ef ("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