[libvirt] [PATCH 2/3] Fix libxl vm def handling on domU cleanup
Markus Groß
gross at univention.de
Wed May 18 08:06:37 UTC 2011
Otherwise vm->newDef remains in the domain
object even when it is destroyed.
---
src/libxl/libxl_driver.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 5cc9362..a14ace1 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -276,6 +276,13 @@ libxlVmCleanup(libxlDriverPrivatePtr driver,
VIR_DEBUG("Failed to remove domain XML for %s", vm->def->name);
VIR_FREE(file);
}
+
+ if (vm->newDef) {
+ virDomainDefFree(vm->def);
+ vm->def = vm->newDef;
+ vm->def->id = -1;
+ vm->newDef = NULL;
+ }
}
/*
--
1.7.5.1
More information about the libvir-list
mailing list