]> Git Repo - qemu.git/commitdiff
Set cpuid definition to 0 before initializing it
authorJoerg Roedel <[email protected]>
Mon, 27 Sep 2010 13:16:16 +0000 (15:16 +0200)
committerAnthony Liguori <[email protected]>
Wed, 20 Oct 2010 21:15:04 +0000 (16:15 -0500)
This patch cleans the (stack-allocated) cpuid definition to
0 before actually initializing it.

Signed-off-by: Joerg Roedel <[email protected]>
Signed-off-by: Avi Kivity <[email protected]>
target-i386/cpuid.c

index 04ba8d5152ac6e804c294fa8c6244e5c67df2797..3fcf78f093abbdcc9a5cc4f74ddde14f332efc2e 100644 (file)
@@ -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) {
This page took 0.028195 seconds and 4 git commands to generate.