New Defects reported by Coverity Scan for libvirt

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. New defect(s) Reported-by: Coverity Scan Showing 2 of 2 defect(s) ** CID 435590: (RESOURCE_LEAK) /src/ch/ch_process.c: 491 in chSocketRecv() /src/ch/ch_process.c: 482 in chSocketRecv() ________________________________________________________________________________________________________ *** CID 435590: (RESOURCE_LEAK) /src/ch/ch_process.c: 491 in chSocketRecv() 485 do { 486 ret = recv(sock, buf, buf_len - 1, 0); 487 } while (ret < 0 && errno == EINTR); 488 489 if (ret < 0) { 490 virReportSystemError(errno, _("recv on sock %1$d failed"), sock);
CID 435590: (RESOURCE_LEAK) Variable "buf" going out of scope leaks the storage it points to.
491 return NULL; 492 } 493 494 return g_steal_pointer(&buf); 495 } 496 /src/ch/ch_process.c: 482 in chSocketRecv() 476 if (ret <= 0) { 477 if (ret < 0) { 478 virReportSystemError(errno, _("Poll on sock %1$d failed"), sock); 479 } else if (ret == 0) { 480 virReportSystemError(errno, _("Poll on sock %1$d timed out"), sock); 481 }
CID 435590: (RESOURCE_LEAK) Variable "buf" going out of scope leaks the storage it points to.
482 return NULL; 483 } 484 485 do { 486 ret = recv(sock, buf, buf_len - 1, 0); 487 } while (ret < 0 && errno == EINTR);
** CID 435589: Null pointer dereferences (FORWARD_NULL) /src/hypervisor/domain_interface.c: 442 in virDomainInterfaceDeleteDevice() ________________________________________________________________________________________________________ *** CID 435589: Null pointer dereferences (FORWARD_NULL) /src/hypervisor/domain_interface.c: 442 in virDomainInterfaceDeleteDevice() 436 * this interface in the network driver 437 */ 438 if (vport) { 439 if (vport->virtPortType == VIR_NETDEV_VPORT_PROFILE_MIDONET) { 440 ignore_value(virNetDevMidonetUnbindPort(vport)); 441 } else if (vport->virtPortType == VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH) {
CID 435589: Null pointer dereferences (FORWARD_NULL) Passing null pointer "net->ifname" to "virNetDevOpenvswitchRemovePort", which dereferences it. (The dereference is assumed on the basis of the "nonnull" parameter attribute.)
442 ignore_value(virNetDevOpenvswitchRemovePort( 443 virDomainNetGetActualBridgeName(net), 444 net->ifname)); 445 } 446 } 447
________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0...
participants (1)
-
scan-admin@coverity.com