From: Maurizio Lombardi Date: Fri, 4 Mar 2016 09:41:49 +0000 (+0100) Subject: be2iscsi: set the boot_kset pointer to NULL in case of failure X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a41b2efb134bdeefe8c27fa77ffaaef0b974c390;p=linux-beck.git be2iscsi: set the boot_kset pointer to NULL in case of failure In beiscsi_setup_boot_info(), the boot_kset pointer should be set to NULL in case of failure otherwise an invalid pointer dereference may occur later. Cc: Signed-off-by: Maurizio Lombardi Reviewed-by: Johannes Thumshirn Reviewed-by: Jitendra Bhivare Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index e89a0f8d2c6e..f05e7737107d 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -4493,6 +4493,7 @@ put_shost: scsi_host_put(phba->shost); free_kset: iscsi_boot_destroy_kset(phba->boot_kset); + phba->boot_kset = NULL; return -ENOMEM; }