projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
36a840a
)
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
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Wed, 17 May 2023 09:53:39 +0000
(11:53 +0200)
[ Upstream commit
57f14b5ae1a97537f2abd2828ee7212cada7036e
]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/perf/util/pmu.c
patch
|
blob
|
history
diff --git
a/tools/perf/util/pmu.c
b/tools/perf/util/pmu.c
index
0328405
..
9a762c0
100644
(file)
--- a/
tools/perf/util/pmu.c
+++ b/
tools/perf/util/pmu.c
@@
-1845,7
+1845,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);