]> Gentwo Git Trees - linux/.git/commit
perf tools kvm: Add missed memory allocation check and free
authorDapeng Mi <dapeng1.mi@linux.intel.com>
Fri, 19 Sep 2025 02:16:54 +0000 (10:16 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 2 Oct 2025 18:30:21 +0000 (15:30 -0300)
commit9262fa242b73d32bd849cbcefb9b7311d2c04637
tree0edf50c089d3d7486c57a79a474691008bb88eab
parentf0015d8149de3b54af04147527163422eb34ec00
perf tools kvm: Add missed memory allocation check and free

Current code allocates rec_argv[] array, but doesn't check if the
allocation is successful and explicitly free the rec_argv[] array.

Add them back.

Signed-off-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-kvm.c