perf inject: Fix missing free in copy_kcore_dir()
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>
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)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
pr_debug("%s\n", cmd);
|
pr_debug("%s\n", cmd);
|
||||||
return system(cmd);
|
ret = system(cmd);
|
||||||
|
free(cmd);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int output_fd(struct perf_inject *inject)
|
static int output_fd(struct perf_inject *inject)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user