Skip to contentSkip to conversation

iommu/vt-d: fix memory leak

PATCH Applied Sudip Mukherjee 2 participants 2 messages Sep 18, 2015 – Sep 29, 2015 IOMMU

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu/vt-d: fix memory leak

We are returning NULL if we are not able to attach the iommu to the domain but while returning we missed freeing info.

---
 drivers/iommu/intel-iommu.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iommu/intel-iommu.c +1 -0
index 8a74fcc..668acf7 100644
@@ -2305,6 +2305,7 @@ static struct dmar_domain *dmar_insert_one_dev_info(struct intel_iommu *iommu,
 
 	if (ret) {
 		spin_unlock_irqrestore(&device_domain_lock, flags);
+		free_devinfo_mem(info);
 		return NULL;
 	}
 
Signature · 1 line
1.9.1
maintainer Applied
#1 lore raw
Quoted 7 lines · Sudip Mukherjee

We are returning NULL if we are not able to attach the iommu to the domain but while returning we missed freeing info.

---
 drivers/iommu/intel-iommu.c | 1 +
 1 file changed, 1 insertion(+)

Applied, thanks.