]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
VT-d/dmar: iommu mem leak fix
authorZhenzhong Duan <zhenzhong.duan@oracle.com>
Mon, 27 Aug 2018 09:37:24 +0000 (11:37 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 27 Aug 2018 09:37:24 +0000 (11:37 +0200)
Release memory allocated for drhd iommu in error path.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/drivers/passthrough/vtd/dmar.c

index 46decd4eb1c2544a78a4793377719f38938f3ea1..81afa5498e8e20f18d5fcfc38d5a87511a6ab9a6 100644 (file)
@@ -100,6 +100,7 @@ static void __init disable_all_dmar_units(void)
     {
         list_del(&drhd->list);
         scope_devices_free(&drhd->scope);
+        iommu_free(drhd);
         xfree(drhd);
     }
     list_for_each_entry_safe ( rmrr, _rmrr, &acpi_rmrr_units, list )