From c954f8aed44686569347087a57c75c590ce2782d Mon Sep 17 00:00:00 2001 From: Venkata Siva Vijayendra Bhamidipati Date: Fri, 28 Jan 2011 16:03:36 -0800 Subject: [SCSI] fnic: fix memory leak Fix memory leak arising due to incorrect freeing of allocated memory for vnic stats when unregistering a vnic. Signed-off-by: Abhijeet Joglekar Signed-off-by: Venkata Siva Vijayendra Bhamidipati Signed-off-by: Robert Love Signed-off-by: James Bottomley --- drivers/scsi/fnic/vnic_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/scsi/fnic') diff --git a/drivers/scsi/fnic/vnic_dev.c b/drivers/scsi/fnic/vnic_dev.c index db710148d156..b576be734e2e 100644 --- a/drivers/scsi/fnic/vnic_dev.c +++ b/drivers/scsi/fnic/vnic_dev.c @@ -654,7 +654,7 @@ void vnic_dev_unregister(struct vnic_dev *vdev) vdev->linkstatus_pa); if (vdev->stats) pci_free_consistent(vdev->pdev, - sizeof(struct vnic_dev), + sizeof(struct vnic_stats), vdev->stats, vdev->stats_pa); if (vdev->fw_info) pci_free_consistent(vdev->pdev, -- cgit v1.2.1