From: Sudip Mukherjee Date: Fri, 18 Sep 2015 10:57:07 +0000 (+0530) Subject: iommu/vt-d: Fix memory leak in dmar_insert_one_dev_info() X-Git-Tag: v4.3-rc6~22^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=499f3aa4323775d5320bdf7ccc26576c54a54169;p=platform%2Fkernel%2Flinux-exynos.git iommu/vt-d: Fix memory leak in dmar_insert_one_dev_info() 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 Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 2d7349a..da99310 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -2301,6 +2301,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; }