]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Fix coverity defects: CID 153459
authorluozhengzheng <luo.zhengzheng@zte.com.cn>
Thu, 20 Oct 2016 18:54:02 +0000 (02:54 +0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 20 Oct 2016 18:54:02 +0000 (11:54 -0700)
CID 153459: Null pointer dereferences (FORWARD_NULL)
Accidentally introduced by #5159.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: luozhengzheng <luo.zhengzheng@zte.com.cn>
Closes #5310

module/zfs/zfs_fm.c

index 5b6bea7aefc2e1b504ee15813b897c6fb617ce65..15dbdc2a0b50af415a1b03d5fad464866009a8e2 100644 (file)
@@ -219,7 +219,7 @@ zfs_ereport_start(nvlist_t **ereport_out, nvlist_t **detector_out,
        }
 
        if ((strcmp(subclass, FM_EREPORT_ZFS_DELAY) == 0) &&
-           !zio->io_timestamp) {
+           (zio != NULL) && (!zio->io_timestamp)) {
                /* Ignore bogus delay events */
                return;
        }