Skip to content

Commit

Permalink
iommu/vt-d: Fix memory leak in dmar_insert_one_dev_info()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
  • Loading branch information
Sudip Mukherjee authored and Joerg Roedel committed Sep 29, 2015
1 parent 9ffecb1 commit 499f3aa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/iommu/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 499f3aa

Please sign in to comment.