cpu: Avoid NULL dereference

Don't dereference 'model' in PowerPCBaseline when there's no outputModel
This commit is contained in:
John Ferlan 2013-01-07 12:09:34 -05:00 committed by Eric Blake
parent 36ac6e37be
commit 3e251af561

View File

@ -605,7 +605,8 @@ PowerPCBaseline(virCPUDefPtr *cpus,
goto error;
}
base_model->data->ppc.pvr = model->data->ppc.pvr;
if (outputModel)
base_model->data->ppc.pvr = model->data->ppc.pvr;
if (PowerPCDecode(cpu, base_model->data, models, nmodels, NULL) < 0)
goto error;