提交 db0ad1ba 编写于 作者: J Joerg Roedel 提交者: Anthony Liguori

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: NJoerg Roedel <joerg.roedel@amd.com>
Signed-off-by: NAvi Kivity <avi@redhat.com>
上级 1e027be7
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册