summaryrefslogtreecommitdiffstats
path: root/cmd/zed
diff options
context:
space:
mode:
authorluozhengzheng <[email protected]>2016-11-09 06:34:52 +0800
committerBrian Behlendorf <[email protected]>2016-11-08 14:34:52 -0800
commit70df4c21c0da3baacb6601d924dd1fb2b3cad1b3 (patch)
tree8845342bd891c077fe823d8f226700e7c51b2802 /cmd/zed
parenta36cc8d2428259f5cfefb653bff39ca7afc66518 (diff)
Fix coverity defects: 154021
CID 154021: Null pointer dereference Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: luozhengzheng <[email protected]> Closes #5380
Diffstat (limited to 'cmd/zed')
-rw-r--r--cmd/zed/agents/fmd_serd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/zed/agents/fmd_serd.c b/cmd/zed/agents/fmd_serd.c
index 6143c5d7e..043552862 100644
--- a/cmd/zed/agents/fmd_serd.c
+++ b/cmd/zed/agents/fmd_serd.c
@@ -300,6 +300,9 @@ fmd_serd_eng_gc(fmd_serd_eng_t *sgp)
return; /* no garbage collection needed if empty or fired */
sep = list_head(&sgp->sg_list);
+ if (sep == NULL)
+ return;
+
hrt = sep->se_hrt - sgp->sg_t;
for (sep = list_head(&sgp->sg_list); sep != NULL; sep = nep) {