It's safer to initialize them than require that compat_normalize_cpu_model() always initialize them, even on errors.
Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- target-i386/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 0bf62da..c48de43 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -1503,8 +1503,8 @@ int cpu_x86_register(X86CPU *cpu, const char *cpu_model) { X86CPUDefinition def1, *def = &def1; Error *error = NULL; - QDict *features; - char *name; + QDict *features = NULL; + char *name = NULL; /* for CPU subclasses should go into cpu_x86_init() before object_new() */ compat_normalize_cpu_model(cpu_model, &name, &features, &error); -- 1.7.11.2