Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1227771 > unrolled thread

[PATCH] iommu/vt-d: fix memory leak

Started bySudip Mukherjee <sudipm.mukherjee@gmail.com>
First post2015-09-18 13:00 +0200
Last post2015-09-18 13:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] iommu/vt-d: fix memory leak Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-09-18 13:00 +0200

#1227771 — [PATCH] iommu/vt-d: fix memory leak

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2015-09-18 13:00 +0200
Subject[PATCH] iommu/vt-d: fix memory leak
Message-ID<qa1yz-or-31@gated-at.bofh.it>
We are returning NULL if we are not able to attach the iommu to the
domain but while returning we missed freeing info.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/iommu/intel-iommu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 8a74fcc..668acf7 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -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;
 	}
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web