mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 01:43:23 +00:00
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...
This commit is contained in:
parent
daefe3f300
commit
fcb13292b1
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user