iommu/amd: Free domain id when free a domain of struct dma_ops_domain
commit c3db901c54466a9c135d1e6e95fec452e8a42666 upstream.
The current code missed freeing domain id when free a domain of
struct dma_ops_domain.
Signed-off-by: Baoquan He <bhe@redhat.com>
Fixes: ec487d1a11
('x86, AMD IOMMU: add domain allocation and deallocation functions')
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f5bb841637
commit
f029e7b34f
1 changed files with 3 additions and 0 deletions
|
@ -1833,6 +1833,9 @@ static void dma_ops_domain_free(struct dma_ops_domain *dom)
|
|||
kfree(dom->aperture[i]);
|
||||
}
|
||||
|
||||
if (dom->domain.id)
|
||||
domain_id_free(dom->domain.id);
|
||||
|
||||
kfree(dom);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue