public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iommu/vt-d: fix memory leak
@ 2015-09-18 10:57 Sudip Mukherjee
  2015-09-29 13:40 ` Joerg Roedel
  0 siblings, 1 reply; 2+ messages in thread
From: Sudip Mukherjee @ 2015-09-18 10:57 UTC (permalink / raw)
  To: David Woodhouse, Joerg Roedel; +Cc: linux-kernel, iommu, 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.

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] iommu/vt-d: fix memory leak
  2015-09-18 10:57 [PATCH] iommu/vt-d: fix memory leak Sudip Mukherjee
@ 2015-09-29 13:40 ` Joerg Roedel
  0 siblings, 0 replies; 2+ messages in thread
From: Joerg Roedel @ 2015-09-29 13:40 UTC (permalink / raw)
  To: Sudip Mukherjee; +Cc: David Woodhouse, linux-kernel, iommu

On Fri, Sep 18, 2015 at 04:27:07PM +0530, Sudip Mukherjee wrote:
> 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(+)

Applied, thanks.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-29 13:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-18 10:57 [PATCH] iommu/vt-d: fix memory leak Sudip Mukherjee
2015-09-29 13:40 ` Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox