mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 02:49:32 +03:00
Fix coverity defects: CID 161288
CID 161288: Null pointer dereferences (REVERSE_INULL) Ensure physpath != NULL before the strcmp. Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov> Closes #5974
This commit is contained in:
parent
c1d9abf905
commit
f02ad0dc75
@ -264,7 +264,7 @@ zfs_process_add(zpool_handle_t *zhp, nvlist_t *vdev, boolean_t labeled)
|
|||||||
* vdev_id alias rule for using scsi_debug devices (FMA automated
|
* vdev_id alias rule for using scsi_debug devices (FMA automated
|
||||||
* testing)
|
* testing)
|
||||||
*/
|
*/
|
||||||
if (strcmp("scsidebug", physpath) == 0)
|
if (physpath != NULL && strcmp("scsidebug", physpath) == 0)
|
||||||
is_sd = 1;
|
is_sd = 1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user