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 417227: Null pointer dereferences (NULL_RETURNS) /src/qemu/qemu_nbdkit.c: 974 in qemuNbdkitProcessBuildCommandAuth() ________________________________________________________________________________________________________ *** CID 417227: Null pointer dereferences (NULL_RETURNS) /src/qemu/qemu_nbdkit.c: 974 in qemuNbdkitProcessBuildCommandAuth() 968 _("invalid secret type %1$s"), 969 authdef->secrettype); 970 return -1; 971 } 972 973 conn = virGetConnectSecret();
CID 417227: Null pointer dereferences (NULL_RETURNS) Dereferencing a pointer that might be "NULL" "conn" when calling "virSecretGetSecretString". (The dereference is assumed on the basis of the "nonnull" parameter attribute.)
974 if (virSecretGetSecretString(conn, 975 &authdef->seclookupdef, 976 secrettype, 977 &secret, 978 &secretlen) < 0) 979 return -1;
** CID 417226: Error handling issues (CHECKED_RETURN) /src/qemu/qemu_nbdkit.c: 1284 in qemuNbdkitProcessStop() ________________________________________________________________________________________________________ *** CID 417226: Error handling issues (CHECKED_RETURN) /src/qemu/qemu_nbdkit.c: 1284 in qemuNbdkitProcessStop() 1278 qemuSecurityDomainRestorePathLabel(driver, vm, proc->source->ssh_agent); 1279 1280 if (proc->pid < 0) 1281 return 0; 1282 1283 VIR_DEBUG("Stopping nbdkit process %i", proc->pid);
CID 417226: Error handling issues (CHECKED_RETURN) Calling "virProcessKill" without checking return value (as is done elsewhere 8 out of 10 times).
1284 virProcessKill(proc->pid, SIGTERM); 1285 1286 unlink(proc->pidfile); 1287 unlink(proc->socketfile); 1288 proc->pid = -1; 1289 1290 return 0;
________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0...
participants (1)
-
scan-admin@coverity.com