projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5faa23c
)
perf metricgroup: Missed free on error path
author
Ian Rogers
<irogers@google.com>
Fri, 24 Oct 2025 17:58:38 +0000
(10:58 -0700)
committer
Namhyung Kim
<namhyung@kernel.org>
Tue, 4 Nov 2025 04:57:21 +0000
(20:57 -0800)
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>
tools/perf/util/metricgroup.c
patch
|
blob
|
history
diff --git
a/tools/perf/util/metricgroup.c
b/tools/perf/util/metricgroup.c
index
595b831
..
c822cf5
100644
(file)
--- a/
tools/perf/util/metricgroup.c
+++ b/
tools/perf/util/metricgroup.c
@@
-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;
}