iommu/amd: Free domain id when free a domain of struct dma_ops_domain

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>
This commit is contained in:
Baoquan He 2016-09-15 16:50:52 +08:00 committed by Joerg Roedel
parent 5c87f62dd1
commit c3db901c54

View File

@ -1723,6 +1723,9 @@ static void dma_ops_domain_free(struct dma_ops_domain *dom)
free_pagetable(&dom->domain);
if (dom->domain.id)
domain_id_free(dom->domain.id);
kfree(dom);
}