提交 fbf8e1c3 编写于 作者: D Daniel P. Berrange

Fix leak in virDomainVcpuPinDefArrayFree

If virDomainVcpuPinDefArrayFree is called with def != NULL,
but nvcpupin == 0, then it leaks memory for 'def'. This is
an unusual scenario, but it hits when cleaning up after an
OOM during parsing of XML.
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 386ebb47
......@@ -1854,7 +1854,7 @@ virDomainVcpuPinDefArrayFree(virDomainVcpuPinDefPtr *def,
{
size_t i;
if (!def || !nvcpupin)
if (!def)
return;
for (i = 0; i < nvcpupin; i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册