[libvirt] [PATCH 5/6] libxlDoMigrateReceive: Drop useless check for !vm
Michal Privoznik
mprivozn at redhat.com
Thu Aug 4 07:47:49 UTC 2016
In the cleanup path, @vm cannot be possibly NULL. If it were so,
we would receive SIGSEGV much earlier. At the beginning of the
function we do libxlDomainObjBeginJob(.., vm, ..); and so on.
Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---
src/libxl/libxl_migration.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libxl/libxl_migration.c b/src/libxl/libxl_migration.c
index 8be7877..f1da251 100644
--- a/src/libxl/libxl_migration.c
+++ b/src/libxl/libxl_migration.c
@@ -296,7 +296,7 @@ libxlDoMigrateReceive(void *opaque)
libxlDomainObjEndJob(driver, vm);
cleanup:
- if (remove_dom && vm) {
+ if (remove_dom) {
virDomainObjListRemove(driver->domains, vm);
vm = NULL;
}
--
2.8.4
More information about the libvir-list
mailing list