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

Fix leak in virDomainVcpuPinDefParseXML parsing cpumask

If the virBitmapParse method fails due to OOM, we leak
the 'tmp' variable string.
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 1fff45cc
......@@ -10616,8 +10616,10 @@ virDomainVcpuPinDefParseXML(const xmlNodePtr node,
int cpumasklen = VIR_DOMAIN_CPUMASK_LEN;
if (virBitmapParse(set, 0, &def->cpumask,
cpumasklen) < 0)
goto error;
cpumasklen) < 0) {
VIR_FREE(tmp);
goto error;
}
VIR_FREE(tmp);
} else {
virReportError(VIR_ERR_INTERNAL_ERROR,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册