Skip to content

Commit

Permalink
perf pmu: zfree() expects a pointer to a pointer to zero it after fre…
Browse files Browse the repository at this point in the history
…eing its contents

[ Upstream commit 57f14b5 ]

An audit showed just this one problem with zfree(), fix it.

Fixes: 9fbc61f ("perf pmu: Add support for PMU capabilities")
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
acmel authored and gregkh committed May 17, 2023
1 parent e685e2e commit 4f12816
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/perf/util/pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1858,7 +1858,7 @@ static int perf_pmu__new_caps(struct list_head *list, char *name, char *value)
return 0;

free_name:
zfree(caps->name);
zfree(&caps->name);
free_caps:
free(caps);

Expand Down

0 comments on commit 4f12816

Please sign in to comment.