Fix coverity defects: 154021
CID 154021: Null pointer dereference Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: luozhengzheng <luo.zhengzheng@zte.com.cn> Closes #5380
This commit is contained in:
parent
a36cc8d242
commit
70df4c21c0
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue