]> xenbits.xensource.com Git - xen.git/commitdiff
VT-d/dmar: iommu mem leak fix
authorZhenzhong Duan <zhenzhong.duan@oracle.com>
Fri, 14 Sep 2018 11:35:54 +0000 (13:35 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 14 Sep 2018 11:35:54 +0000 (13:35 +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>
master commit: fd07b6648c4c8891dca5bd0f7ef174b6831f80b2
master date: 2018-08-27 11:37:24 +0200

xen/drivers/passthrough/vtd/dmar.c

index 1ff7bd3194ed6126302a1a6c7c80033606babbb1..cd2b70ba2f624f5f070a6e1560f3d2b62765077c 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 )