Messages in this thread | | | Date | Tue, 23 Apr 2024 13:10:57 +0200 | Subject | Re: [PATCH] KVM: selftests: Add 'malloc' failure check in config_name | From | 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 vcpu_reg_list *c) > len += strlen(s->name) + 1; > > c->name = malloc(len); > + TEST_ASSERT(c->name, "-ENOMEM when allocating config name"); …
Can “errno” be relevant for the error message construction?
Regards, Markus
| |