From fd07b6648c4c8891dca5bd0f7ef174b6831f80b2 Mon Sep 17 00:00:00 2001 From: Zhenzhong Duan Date: Mon, 27 Aug 2018 11:37:24 +0200 Subject: [PATCH] VT-d/dmar: iommu mem leak fix Release memory allocated for drhd iommu in error path. Signed-off-by: Zhenzhong Duan Acked-by: Kevin Tian --- xen/drivers/passthrough/vtd/dmar.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/vtd/dmar.c index 46decd4eb1..81afa5498e 100644 --- a/xen/drivers/passthrough/vtd/dmar.c +++ b/xen/drivers/passthrough/vtd/dmar.c @@ -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 ) -- 2.30.2