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 <mpriv...@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

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to