mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-31 16:38:12 +00:00
perf inject: Fix missing free in copy_kcore_dir()
Free string allocated by asprintf().
Fixes: d8fc085509
("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>
This commit is contained in:
parent
0840a7914c
commit
342cb0d806
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue