Re: [PATCH] KVM: selftests: Add 'malloc' failure check in config_name

2024-04-23 Thread Markus Elfring
… > This patch will add the malloc failure checking … * Please use a corresponding imperative wording for the change description. * Would you like to add the tag “Fixes” accordingly? … > +++ b/tools/testing/selftests/kvm/get-reg-list.c > @@ -66,6 +66,7 @@ static const char *config_name(struct v

Re: [PATCH] KVM: selftests: Add 'malloc' failure check in config_name

2024-04-23 Thread Muhammad Usama Anjum
On 4/23/24 12:37 PM, Kunwu Chan wrote: > There is a 'malloc' call in config_name function, which can > be unsuccessful. This patch will add the malloc failure checking > to avoid possible null dereference and give more information > about test fail reasons. > > Signed-off-by: Kunwu Chan LGTM Rev

[PATCH] KVM: selftests: Add 'malloc' failure check in config_name

2024-04-23 Thread Kunwu Chan
There is a 'malloc' call in config_name function, which can be unsuccessful. This patch will add the malloc failure checking to avoid possible null dereference and give more information about test fail reasons. Signed-off-by: Kunwu Chan --- tools/testing/selftests/kvm/get-reg-list.c | 1 + 1 fil