diff options
| author | James Clark <james.clark@linaro.org> | 2025-03-19 10:16:10 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-04-10 14:44:34 +0200 |
| commit | 3b77fa84b2f2cca1aafc11ca373a6c7009b11f8d (patch) | |
| tree | 70815f333643aade280b3107a198865ef4373354 /tools | |
| parent | 408065a4db6e0a9daf24af1118fa335db42586a6 (diff) | |
| download | linux-3b77fa84b2f2cca1aafc11ca373a6c7009b11f8d.tar.gz linux-3b77fa84b2f2cca1aafc11ca373a6c7009b11f8d.tar.bz2 linux-3b77fa84b2f2cca1aafc11ca373a6c7009b11f8d.zip | |
perf: intel-tpebs: Fix incorrect usage of zfree()
[ Upstream commit 6d2dcd635204c023eb5328ad7d38b198a5558c9b ]
zfree() requires an address otherwise it frees what's in name, rather
than name itself. Pass the address of name to fix it.
This was the only incorrect occurrence in Perf found using a search.
Fixes: 8db5cabcf1b6 ("perf stat: Fork and launch 'perf record' when 'perf stat' needs to get retire latency value for a metric.")
Signed-off-by: James Clark <james.clark@linaro.org>
Link: https://lore.kernel.org/r/20250319101614.190922-1-james.clark@linaro.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/perf/util/intel-tpebs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/intel-tpebs.c b/tools/perf/util/intel-tpebs.c index 50a3c3e07160..2c421b475b3b 100644 --- a/tools/perf/util/intel-tpebs.c +++ b/tools/perf/util/intel-tpebs.c @@ -254,7 +254,7 @@ int tpebs_start(struct evlist *evsel_list) new = zalloc(sizeof(*new)); if (!new) { ret = -1; - zfree(name); + zfree(&name); goto err; } new->name = name; |
