Message ID | 20231113-kvm-get-reg-list-str-init-v3-1-eaf67d660007@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v3] KVM: selftests: Initialise dynamically allocated configuration names | expand |
diff --git a/tools/testing/selftests/kvm/get-reg-list.c b/tools/testing/selftests/kvm/get-reg-list.c index be7bf5224434..dd62a6976c0d 100644 --- a/tools/testing/selftests/kvm/get-reg-list.c +++ b/tools/testing/selftests/kvm/get-reg-list.c @@ -67,6 +67,7 @@ static const char *config_name(struct vcpu_reg_list *c) c->name = malloc(len); + c->name[0] = '\0'; len = 0; for_each_sublist(c, s) { if (!strcmp(s->name, "base"))