提交 3b5f1ca5 编写于 作者: J Jiri Denemark

cpu_x86: Use g_auto* in virCPUx86CheckFeature

Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 e6e54fce
......@@ -2278,21 +2278,16 @@ static int
virCPUx86CheckFeature(const virCPUDef *cpu,
const char *name)
{
int ret = -1;
virCPUx86MapPtr map;
virCPUx86ModelPtr model = NULL;
g_autoptr(virCPUx86Model) model = NULL;
if (!(map = virCPUx86GetMap()))
return -1;
if (!(model = x86ModelFromCPU(cpu, map, -1)))
goto cleanup;
ret = x86FeatureInData(name, &model->data, map);
return -1;
cleanup:
x86ModelFree(model);
return ret;
return x86FeatureInData(name, &model->data, map);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册