Commit c954f8ae authored by Venkata Siva Vijayendra Bhamidipati's avatar Venkata Siva Vijayendra Bhamidipati Committed by James Bottomley

[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: default avatarAbhijeet Joglekar <abjoglek@cisco.com>
Signed-off-by: default avatarVenkata Siva Vijayendra Bhamidipati <vbhamidi@cisco.com>
Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent e4a9a982
...@@ -654,7 +654,7 @@ void vnic_dev_unregister(struct vnic_dev *vdev) ...@@ -654,7 +654,7 @@ void vnic_dev_unregister(struct vnic_dev *vdev)
vdev->linkstatus_pa); vdev->linkstatus_pa);
if (vdev->stats) if (vdev->stats)
pci_free_consistent(vdev->pdev, pci_free_consistent(vdev->pdev,
sizeof(struct vnic_dev), sizeof(struct vnic_stats),
vdev->stats, vdev->stats_pa); vdev->stats, vdev->stats_pa);
if (vdev->fw_info) if (vdev->fw_info)
pci_free_consistent(vdev->pdev, pci_free_consistent(vdev->pdev,
......
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