perf inject: Fix missing free in copy_kcore_dir()
Adrian Hunter
reviewerPATCH 1/1 perf inject: Fix missing free in copy_kcore_dir()
Free string allocated by asprintf().
Fixes d8fc08550929bb ("perf inject: Keep a copy of kcore_dir")
Signed-off-by Adrian Hunter <[email protected]>
--- tools/perf/builtin-inject.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
tools/perf/builtin-inject.c +3 -1
@@ -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)
Signature · 1 line
2.25.1
Em Mon, Jun 20, 2022 at 01:39:04PM +0300, Adrian Hunter escreveu:
Quoted 4 lines
Free string allocated by
asprintf().Fixes d8fc08550929bb ("perf inject: Keep a copy of kcore_dir")Signed-off-by Adrian Hunter <[email protected]>
Thanks, applied.
- Arnaldo
Quoted 21 lines
--- tools/perf/builtin-inject.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)tools/perf/builtin-inject.c +3
-1@@ -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)Signature · 1 line
2.25.1
Signature · 1 line
- Arnaldo