mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
perf metricgroup: Missed free on error path
If an out-of-memory occurs the expr also needs freeing. Signed-off-by: Ian Rogers <irogers@google.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
parent
5faa23cdab
commit
3bae9228a5
|
|
@ -1455,6 +1455,7 @@ static int parse_groups(struct evlist *perf_evlist,
|
|||
|
||||
if (!expr->metric_name) {
|
||||
ret = -ENOMEM;
|
||||
free(expr);
|
||||
free(metric_events);
|
||||
goto out;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user