On 12/6/20 5:53 PM, Wenchao Hao wrote: > Check if t is valid before accessing it. > > Signed-off-by: Wenchao Hao <[email protected]> > Signed-off-by: Zhiqiang Liu <[email protected]> > Signed-off-by: Wu Bo <[email protected]> > --- > usr/iscsi_sysfs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c > index 540adfd..abefde2 100644 > --- a/usr/iscsi_sysfs.c > +++ b/usr/iscsi_sysfs.c > @@ -856,7 +856,7 @@ static int iscsi_sysfs_read_iface(struct iface_rec > *iface, int host_no, > } > } > > - if (session && t->template->use_boot_info) > + if (session && t && t->template->use_boot_info) > iscsi_sysfs_read_boot(iface, session); > > if (!iface_kern_id) >
Reviewed-by: Lee Duncan <[email protected]> -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/open-iscsi/10d940f4-7526-275d-4f9f-4d05cfcdd0f1%40suse.com.
