]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[SCSI] fnic: fix memory leak
authorVenkata Siva Vijayendra Bhamidipati <vbhamidi@cisco.com>
Sat, 29 Jan 2011 00:03:36 +0000 (16:03 -0800)
committerJames Bottomley <James.Bottomley@suse.de>
Sat, 12 Feb 2011 16:58:02 +0000 (10:58 -0600)
Fix memory leak arising due to incorrect freeing of allocated memory
for vnic stats when unregistering a vnic.

Signed-off-by: Abhijeet Joglekar <abjoglek@cisco.com>
Signed-off-by: Venkata Siva Vijayendra Bhamidipati <vbhamidi@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/fnic/vnic_dev.c

index db710148d1568ba8d3b7e12b726954c767a8c09e..b576be734e2e04a342cd031f75c146096bc1c2f5 100644 (file)
@@ -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,