Several error paths would end up freeing scope->devices twice.

Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>
CC: Jan Beulich <jbeul...@suse.com>
CC: Elena Ufimtseva <elena.ufimts...@oracle.com>
CC: Yang Zhang <yang.z.zh...@intel.com>
CC: Kevin Tian <kevin.t...@intel.com>
---
 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 8ed1e24..2672688 100644
--- a/xen/drivers/passthrough/vtd/dmar.c
+++ b/xen/drivers/passthrough/vtd/dmar.c
@@ -88,6 +88,7 @@ static void scope_devices_free(struct dmar_scope *scope)
 
     scope->devices_cnt = 0;
     xfree(scope->devices);
+    scope->devices = NULL;
 }
 
 static void __init disable_all_dmar_units(void)
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to