提交 118fcdd4 编写于 作者: D Daniel P. Berrangé

cpu: fix cleanup when signature parsing fails

Two pieces of code accidentally jumped to the wrong label when they
failed causing incorrect cleanup, returning a partially initialized
CPU model struct.
Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 eda5f575
......@@ -1251,7 +1251,7 @@ x86ModelParse(xmlXPathContextPtr ctxt,
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Invalid CPU signature family in model %s"),
model->name);
goto cleanup;
goto error;
}
rc = virXPathUInt("string(./signature/@model)", ctxt, &sigModel);
......@@ -1259,7 +1259,7 @@ x86ModelParse(xmlXPathContextPtr ctxt,
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Invalid CPU signature model in model %s"),
model->name);
goto cleanup;
goto error;
}
model->signature = x86MakeSignature(sigFamily, sigModel, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册