提交 5b45d2cf 编写于 作者: J Jiri Denemark

cpu_x86: Use g_auto* in x86EncodePolicy

Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 9bb9cbf6
......@@ -2164,7 +2164,7 @@ x86EncodePolicy(virCPUx86Data *data,
virCPUx86MapPtr map,
virCPUFeaturePolicy policy)
{
virCPUx86ModelPtr model;
g_autoptr(virCPUx86Model) model = NULL;
if (!(model = x86ModelFromCPU(cpu, map, policy)))
return -1;
......@@ -2172,7 +2172,6 @@ x86EncodePolicy(virCPUx86Data *data,
*data = model->data;
model->data.len = 0;
model->data.items = NULL;
x86ModelFree(model);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册