diff options
| author | Chaithanya Lagisetty <nagachaithanya9911@gmail.com> | 2026-09-01 09:08:38 +0000 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-09-11 09:35:44 -0700 |
| commit | b57917fc2b26561a409894188ee55e7b6568941a (patch) | |
| tree | 9caa2add02fdcd3c3fd85a6d05b3468bcfb287fe /tools/perf/scripts/python/syscall-counts.py | |
| parent | 2023782431927239c61330792904eff96ab9c1dc (diff) | |
KVM: selftests: Check calloc() return in vcpu_get_reg_list()
vcpu_get_reg_list() allocates reg_list with calloc() and immediately
dereferences it via reg_list->n without checking for allocation failure,
unlike every other allocation in this file which is guarded by
TEST_ASSERT(). If calloc() returns NULL the test crashes with a NULL
pointer dereference instead of a clean failure message.
Add the missing TEST_ASSERT() check.
Fixes: fd02029a9e01 ("KVM: selftests: Add aarch64 get-reg-list test")
Signed-off-by: Chaithanya Lagisetty <nagachaithanya9911@gmail.com>
Link: https://patch.msgid.link/20260901090839.3338955-1-nagachaithanya9911@gmail.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions
