New Defects reported by Coverity Scan for libvirt
scan-admin at coverity.com
scan-admin at coverity.com
Wed Sep 20 05:24:40 UTC 2023
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-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yqXyKjvBooc6PgQklkMPQjdETL0zD-2BwwS2MT3CUz0PGk4uLnDSo8-2B2mZ3lSeSytwjA-3D5oQ7_CkO38-2FnXVYPAlDbR1ZxdHNqvqoSWeUuqu9763V-2FVMwxQ-2Fwad6vPJNw1E57-2BOx70D5k3wmyM5aAx4hNFozLtMEO29GpEFj22KeFs7HwVhL8yj4XvH5-2FG8hkeFxw8Pxt1sREVDI1pDvwEHR14Oa85bE-2F-2FekRHXSchYuuOo-2FbTaxFO9dd8zfYaf4npICgUxIN6jGM8VJIkX0TCVvWTUrSlJ8Q-3D-3D
More information about the Libvirt-ci
mailing list