diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2023-04-12 15:23:35 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2023-04-12 15:23:35 +0200 |
commit | 57f14b5ae1a97537f2abd2828ee7212cada7036e (patch) | |
tree | 29dda38366b4bb6074f0d8c7cfa5a6932e3f1142 | |
parent | perf metricgroups: Use zfree() to reduce chances of use after free (diff) | |
download | linux-57f14b5ae1a97537f2abd2828ee7212cada7036e.tar.xz linux-57f14b5ae1a97537f2abd2828ee7212cada7036e.zip |
perf pmu: zfree() expects a pointer to a pointer to zero it after freeing its contents
An audit showed just this one problem with zfree(), fix it.
Fixes: 9fbc61f832ebf432 ("perf pmu: Add support for PMU capabilities")
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/util/pmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c index 01533302d5f9..561e2616861f 100644 --- a/tools/perf/util/pmu.c +++ b/tools/perf/util/pmu.c @@ -1852,7 +1852,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); |