Commit 342cb0d8 authored by Adrian Hunter's avatar Adrian Hunter Committed by Arnaldo Carvalho de Melo
Browse files

perf inject: Fix missing free in copy_kcore_dir()



Free string allocated by asprintf().

Fixes: d8fc0855 ("perf inject: Keep a copy of kcore_dir")
Signed-off-by: default avatarAdrian 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 0840a791
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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)