]> git.baikalelectronics.ru Git - kernel.git/commit
perf c2c: Prevent potential memory leak in c2c_he_zalloc()
authorShang XiaoJing <shangxiaojing@huawei.com>
Tue, 6 Sep 2022 03:29:06 +0000 (11:29 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 6 Sep 2022 12:45:23 +0000 (09:45 -0300)
commit880627d4dd9e8bfac6ae598848bf2bd02eb253f2
tree78708aa6801013c0febd5ee2e3786252ee7610a4
parentbf9e296a86c05a952fc73952f80b0da3b322fd0d
perf c2c: Prevent potential memory leak in c2c_he_zalloc()

Free allocated resources when zalloc() fails for members in c2c_he, to
prevent potential memory leak in c2c_he_zalloc().

Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
Reviewed-by: Leo Yan <leo.yan@linaro.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20220906032906.21395-4-shangxiaojing@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-c2c.c