perf: intel-tpebs: Fix incorrect usage of zfree()
[ Upstream commit6d2dcd6352] 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:8db5cabcf1("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
70afdf7711
commit
ed1d004a5a
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user