]> Git Repo - linux.git/commitdiff
perf pmu: zfree() expects a pointer to a pointer to zero it after freeing its contents
authorArnaldo Carvalho de Melo <[email protected]>
Wed, 12 Apr 2023 13:23:35 +0000 (10:23 -0300)
committerArnaldo Carvalho de Melo <[email protected]>
Wed, 12 Apr 2023 13:23:35 +0000 (10:23 -0300)
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 <[email protected]>
tools/perf/util/pmu.c

index 01533302d5f95ad99ed74aa4fba3f141743cf85e..561e2616861f8bd9a2bfbadf5153562bc0dd42bb 100644 (file)
@@ -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);
 
This page took 0.07689 seconds and 4 git commands to generate.