提交 a41b2efb 编写于 作者: M Maurizio Lombardi 提交者: Martin K. Petersen

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: <stable@vger.kernel.org>
Signed-off-by: NMaurizio Lombardi <mlombard@redhat.com>
Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: NJitendra Bhivare <jitendra.bhivare@broadcom.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 f4327a95
......@@ -4493,6 +4493,7 @@ static int beiscsi_setup_boot_info(struct beiscsi_hba *phba)
scsi_host_put(phba->shost);
free_kset:
iscsi_boot_destroy_kset(phba->boot_kset);
phba->boot_kset = NULL;
return -ENOMEM;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册