Message ID | 20231017-kvm-get-reg-list-str-init-v2-1-ee30b1df3e50@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [v2] 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"))