projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0840a79
)
perf inject: Fix missing free in copy_kcore_dir()
author
Adrian Hunter
<adrian.hunter@intel.com>
Mon, 20 Jun 2022 10:39:04 +0000
(13:39 +0300)
committer
Arnaldo Carvalho de Melo
<acme@redhat.com>
Sun, 26 Jun 2022 15:32:15 +0000
(12:32 -0300)
Free string allocated by asprintf().
Fixes:
d8fc08550929bb84
("perf inject: Keep a copy of kcore_dir")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Link:
https://lore.kernel.org/r/20220620103904.7960-1-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-inject.c
patch
|
blob
|
history
diff --git
a/tools/perf/builtin-inject.c
b/tools/perf/builtin-inject.c
index
a75bf11
..
063f74f
100644
(file)
--- a/
tools/perf/builtin-inject.c
+++ b/
tools/perf/builtin-inject.c
@@
-891,7
+891,9
@@
static int copy_kcore_dir(struct perf_inject *inject)
if (ret < 0)
return ret;
pr_debug("%s\n", cmd);
- return system(cmd);
+ ret = system(cmd);
+ free(cmd);
+ return ret;
}
static int output_fd(struct perf_inject *inject)