[PATCH -3rd repost 3/3] SCSI: lpfc, fix memory leak
From: Jiri Slaby
Date:  Thu Dec 10 2009 - 08:37:28 EST
From: Jiri Slaby <jirislaby@xxxxxxxxx>
Stanse found a memory leak on one fail path in lpfc_sli4_read_rev.
Add there kfree.
Signed-off-by: Jiri Slaby <jirislaby@xxxxxxxxx>
Acked-by: James Smart <james.smart@xxxxxxxxxx>
Cc: James E.J. Bottomley <James.Bottomley@xxxxxxx>
---
 drivers/scsi/lpfc/lpfc_sli.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 7935667..487cf8e 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -4110,6 +4110,7 @@ lpfc_sli4_read_rev(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq,
 	if (rc) {
 		dma_free_coherent(&phba->pcidev->dev, dma_size,
 				  dmabuf->virt, dmabuf->phys);
+		kfree(dmabuf);
 		return -EIO;
 	}
 
-- 
1.6.5.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/