提交 372b2cf1 编写于 作者: J Jiri Denemark

cpu_x86: Introduce virCPUx86SignaturesFree

The function will be used for freeing virCPUx86Signatures structure
introduced later in this series.
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 7e0d351f
......@@ -1090,6 +1090,13 @@ x86FeatureParse(xmlXPathContextPtr ctxt,
}
static void
virCPUx86SignaturesFree(uint32_t *signatures)
{
g_free(signatures);
}
static int
virCPUx86SignaturesCopy(virCPUx86ModelPtr dst,
virCPUx86ModelPtr src)
......@@ -1149,7 +1156,7 @@ x86ModelFree(virCPUx86ModelPtr model)
return;
g_free(model->name);
g_free(model->signatures);
virCPUx86SignaturesFree(model->signatures);
virCPUx86DataClear(&model->data);
g_free(model);
}
......@@ -1414,7 +1421,7 @@ x86ModelParseSignatures(virCPUx86ModelPtr model,
return n;
/* Remove inherited signatures. */
VIR_FREE(model->signatures);
virCPUx86SignaturesFree(model->signatures);
model->nsignatures = n;
if (VIR_ALLOC_N(model->signatures, n) < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册