linux-loongson/tools/power/cpupower/bench
Zhongqiu Han 208baa3ec9 pm: cpupower: bench: Prevent NULL dereference on malloc failure
If malloc returns NULL due to low memory, 'config' pointer can be NULL.
Add a check to prevent NULL dereference.

Link: https://lore.kernel.org/r/20250219122715.3892223-1-quic_zhonhan@quicinc.com
Signed-off-by: Zhongqiu Han <quic_zhonhan@quicinc.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2025-02-19 13:48:08 -07:00
..
benchmark.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
benchmark.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
config.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
cpufreq-bench_plot.sh cpupower: Add missing newline at end of file 2019-08-29 09:49:26 -06:00
cpufreq-bench_script.sh cpupower: Add missing newline at end of file 2019-08-29 09:49:26 -06:00
example.cfg
main.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
Makefile cpupower: Disable direct build of the 'bench' subproject 2024-06-28 15:55:20 -06:00
parse.c pm: cpupower: bench: Prevent NULL dereference on malloc failure 2025-02-19 13:48:08 -07:00
parse.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
README-BENCH cpupowerutils: bench: trivial fix of spelling mistake on "average" 2016-04-28 16:02:29 +02:00
system.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
system.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00