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: Ubuntu-5.2.0-15.16~10500^2~3 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=499f3aa4323775d5320bdf7ccc26576c54a54169;p=mirror_ubuntu-eoan-kernel.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 2d7349a3ee14..da99310c1b25 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; }