[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <51828529.90900@stud.fit.vutbr.cz>
Date: Thu, 02 May 2013 17:24:25 +0200
From: Radmila Kompová <xkompo00@...d.fit.vutbr.cz>
To: iommu@...ts.linux-foundation.org
CC: linux-kernel@...r.kernel.org
Subject: [PATCH 1/2] drivers/iommu/amd_iommu.c: fix resource leak in iommu_init_device()
Detected by cppcheck.
Signed-off-by: Kamil Dudka <kdudka@...hat.com>
---
drivers/iommu/amd_iommu.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 8301837..5523ffb 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -448,8 +448,10 @@ static int iommu_init_device(struct device *dev)
}
ret = init_iommu_group(dev);
- if (ret)
+ if (ret) {
+ free_dev_data(dev_data);
return ret;
+ }
if (pci_iommuv2_capable(pdev)) {
struct amd_iommu *iommu;
--
1.8.1.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists