提交 fcb13292 编写于 作者: J John Ferlan

qemu: Resolve Coverity CHECKED_RETURN issue

By adding a call and check of return of virBitmapToData to the
IOThreads code, my Coverity checker lets me know qemuDomainHelperGetVcpus
also needs to check the status...
上级 daefe3f3
......@@ -1420,7 +1420,10 @@ qemuDomainHelperGetVcpus(virDomainObjPtr vm, virVcpuInfoPtr info, int maxinfo,
if (virProcessGetAffinity(priv->vcpupids[v],
&map, maxcpu) < 0)
return -1;
virBitmapToData(map, &tmpmap, &tmpmapLen);
if (virBitmapToData(map, &tmpmap, &tmpmapLen) < 0) {
virBitmapFree(map);
return -1;
}
if (tmpmapLen > maplen)
tmpmapLen = maplen;
memcpy(cpumap, tmpmap, tmpmapLen);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册