Skip to contentSkip to conversation

scsi: lpfc, fix memory leak

PATCH In review [email protected] 1 participant 1 message Dec 22, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 19/19 scsi: lpfc, fix memory leak

From: Jiri Slaby <[email protected]>

Stanse found a memory leak on one fail path in lpfc_sli4_read_rev.

Add there kfree.

---

 drivers/scsi/lpfc/lpfc_sli.c |    1 +
 1 file changed, 1 insertion(+)
drivers/scsi/lpfc/lpfc_sli.c renamed from drivers/scsi/lpfc/lpfc_sli.c~scsi-lpfc-fix-memory-leak +1 -0
diff -puN drivers/scsi/lpfc/lpfc_sli.c~scsi-lpfc-fix-memory-leak drivers/scsi/lpfc/lpfc_sli.c
@@ -4110,6 +4110,7 @@ lpfc_sli4_read_rev(struct lpfc_hba *phba
 	if (rc) {
 		dma_free_coherent(&phba->pcidev->dev, dma_size,
 				  dmabuf->virt, dmabuf->phys);
+		kfree(dmabuf);
 		return -EIO;
 	}
 

_