New Defects reported by Coverity Scan for libvirt
by scan-admin@coverity.com
Hi,
Please find the latest report on new defect(s) introduced to libvirt found with Coverity Scan.
2 new defect(s) introduced to libvirt found with Coverity Scan.
1 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)
** CID 475276: Null pointer dereferences (FORWARD_NULL)
/src/qemu/qemu_validate.c: 2860 in qemuDomainValidateIothreadMapping()
________________________________________________________________________________________________________
*** CID 475276: Null pointer dereferences (FORWARD_NULL)
/src/qemu/qemu_validate.c: 2860 in qemuDomainValidateIothreadMapping()
2854 return -1;
2855 }
2856
2857 for (i = 0; i < ioth->nqueues; i++) {
2858 bool hasMapping;
2859
>>> CID 475276: Null pointer dereferences (FORWARD_NULL)
>>> Dereferencing null pointer "ioth->queues".
2860 if (virBitmapGetBit(queueMap, ioth->queues[i], &hasMapping) < 0) {
2861 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
2862 _("iothread queue '%1$u' mapping out of range"),
2863 ioth->queues[i]);
2864 return -1;
2865 }
** CID 475275: Memory - illegal accesses (USE_AFTER_FREE)
________________________________________________________________________________________________________
*** CID 475275: Memory - illegal accesses (USE_AFTER_FREE)
/src/ch/ch_driver.c: 867 in chDomainSaveFlags()
861
862 /* Remove if VM is not persistent */
863 virCHDomainRemoveInactive(driver, vm);
864 ret = 0;
865
866 endjob:
>>> CID 475275: Memory - illegal accesses (USE_AFTER_FREE)
>>> Calling "virDomainObjEndJob" dereferences freed pointer "vm".
867 virDomainObjEndJob(vm);
868
869 cleanup:
870 virDomainObjEndAPI(&vm);
871 return ret;
872 }
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/libvirt?tab=overview