Commit 0b3a82d3 authored by Eric Sesterhenn's avatar Eric Sesterhenn Committed by James Bottomley
Browse files

[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: default avatarEric Sesterhenn <snakebyte@gmx.de>
Acked-by: default avatarJames Smart <James.Smart@Emulex.Com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 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% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment