linux-stable/tools/lib
Chenyuan Mi 53fc25b7f5 perf subcmd: Fix missing check for return value of malloc() in add_cmdname()
The malloc() function may return NULL when it fails,
which may cause null pointer deference in add_cmdname(),
add Null check for return value of malloc().

Found by our static analysis tool.

Signed-off-by: Chenyuan Mi <cymi20@fudan.edu.cn>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: linux-kernel@vger.kernel.org
Link: https://lore.kernel.org/r/20230614150118.115208-1-cymi20@fudan.edu.cn
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2023-06-20 16:55:35 -07:00
..
api tools api: Add simple timeout to io read 2023-06-14 18:19:06 -03:00
bpf Mainly singleton patches all over the place. Series of note are: 2023-04-27 19:57:00 -07:00
perf perf evlist: Propagate user CPU maps intersecting core PMU maps 2023-05-27 09:38:39 -03:00
subcmd perf subcmd: Fix missing check for return value of malloc() in add_cmdname() 2023-06-20 16:55:35 -07:00
symbol tools lib symbol: Add dependency test to install_headers 2022-12-14 11:16:12 -03:00
thermal tools/lib/thermal: Fix include path for libnl3 in pkg-config file. 2023-02-15 17:29:40 +01:00
argv_split.c
bitmap.c Bitmap patches for v6.0-rc1 2022-08-07 17:52:35 -07:00
ctype.c
find_bit.c tools: sync find_bit() implementation 2022-09-21 12:21:44 -07:00
hweight.c
list_sort.c
rbtree.c
slab.c tools: Move gfp.h and slab.h from radix-tree to lib 2022-02-20 08:44:37 +02:00
str_error_r.c
string.c
vsprintf.c
zalloc.c