提交 0b3a82d3 编写于 作者: E Eric Sesterhenn 提交者: James Bottomley

[SCSI] lpfc: check before dereference in lpfc_ct.c

If we fail to allocate mp->virt during the first while loop iteration,
mlist is still uninitialized, therefore we should check if before
dereferencing.
Signed-off-by: NEric Sesterhenn <snakebyte@gmx.de>
Acked-by: NJames Smart <James.Smart@Emulex.Com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
上级 46c43db1
......@@ -188,7 +188,8 @@ lpfc_alloc_ct_rsp(struct lpfc_hba * phba, int cmdcode, struct ulp_bde64 * bpl,
if (!mp->virt) {
kfree(mp);
lpfc_free_ct_rsp(phba, mlist);
if (mlist)
lpfc_free_ct_rsp(phba, mlist);
return NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册