mirror of
https://github.com/qemu/qemu.git
synced 2024-11-26 12:23:36 +08:00
Set cpuid definition to 0 before initializing it
This patch cleans the (stack-allocated) cpuid definition to 0 before actually initializing it. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
1e027be7e9
commit
db0ad1ba04
@ -788,6 +788,8 @@ int cpu_x86_register (CPUX86State *env, const char *cpu_model)
|
||||
{
|
||||
x86_def_t def1, *def = &def1;
|
||||
|
||||
memset(def, 0, sizeof(*def));
|
||||
|
||||
if (cpu_x86_find_by_name(def, cpu_model) < 0)
|
||||
return -1;
|
||||
if (def->vendor1) {
|
||||
|
Loading…
Reference in New Issue
Block a user