diff options
| author | Hongfu Li <lihongfu@kylinos.cn> | 2026-05-11 14:08:53 +0800 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-05-10 22:28:58 -1000 |
| commit | c26849d32167ec4f2051bb8c9798e850f6381ac9 (patch) | |
| tree | dcb08ac74192f14fe2ff0ead049ec380117de6c7 /include/linux/timerqueue.h | |
| parent | 7ea04cc4fe3cee2139cc2474cadaecc7c53d986d (diff) | |
selftests/cgroup: Add NULL check after malloc in cgroup_util.c
Add NULL checks after malloc() in three helper functions to prevent
NULL pointer dereference on memory allocation failure.
- cg_name()
- cg_name_indexed()
- cg_control()
These functions allocate memory with malloc() but previously called
snprintf() unconditionally, which would trigger undefined behavior
if allocation fails.
Signed-off-by: Hongfu Li <lihongfu@kylinos.cn>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
