提交 1157678f 编写于 作者: J Ján Tomko

virQEMUCapsReset: also clear out hostCPUModel

After succesfully reading an outdated caps cache from disk,
calling virQEMUCapsReset did not properly clear out the calculated
host CPU model. This lead to a memory leak when the host CPU model
pointer was overwritten later in virQEMUCapsNewForBinaryInternal.

Introduced by commit 68c70118.
上级 f830674b
......@@ -3430,6 +3430,9 @@ virQEMUCapsReset(virQEMUCapsPtr qemuCaps)
VIR_FREE(qemuCaps->gicCapabilities);
qemuCaps->ngicCapabilities = 0;
virCPUDefFree(qemuCaps->hostCPUModel);
qemuCaps->hostCPUModel = NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册