mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-29 23:24:11 +08: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
@ -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 New Issue
Block a user