projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
11ff9bc
)
perf pmu: zfree() expects a pointer to a pointer to zero it after freeing its contents
author
Arnaldo Carvalho de Melo
<acme@redhat.com>
Wed, 12 Apr 2023 13:23:35 +0000
(10:23 -0300)
committer
Arnaldo Carvalho de Melo
<acme@redhat.com>
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 <acme@redhat.com>
tools/perf/util/pmu.c
patch
|
blob
|
blame
|
history
diff --git
a/tools/perf/util/pmu.c
b/tools/perf/util/pmu.c
index 01533302d5f95ad99ed74aa4fba3f141743cf85e..561e2616861f8bd9a2bfbadf5153562bc0dd42bb 100644
(file)
--- 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);