aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorGiuseppe Di Natale <[email protected]>2017-04-06 13:18:22 -0700
committerBrian Behlendorf <[email protected]>2017-04-06 13:18:22 -0700
commitf02ad0dc751662dd15537c54c3e25bca9ccefa6c (patch)
tree04fffd368c92f0537aab00acd8f078c08f106e4c /cmd
parentc1d9abf9059a19c2b48eaa645dbce2e1fba3e0b1 (diff)
Fix coverity defects: CID 161288
CID 161288: Null pointer dereferences (REVERSE_INULL) Ensure physpath != NULL before the strcmp. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Giuseppe Di Natale <[email protected]> Closes #5974
Diffstat (limited to 'cmd')
-rw-r--r--cmd/zed/agents/zfs_mod.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/zed/agents/zfs_mod.c b/cmd/zed/agents/zfs_mod.c
index 7ebf708ae..8f2f60bbf 100644
--- a/cmd/zed/agents/zfs_mod.c
+++ b/cmd/zed/agents/zfs_mod.c
@@ -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
* testing)
*/
- if (strcmp("scsidebug", physpath) == 0)
+ if (physpath != NULL && strcmp("scsidebug", physpath) == 0)
is_sd = 1;
/*