]> xenbits.xensource.com Git - libvirt.git/commitdiff
libxlDoMigrateReceive: Drop useless check for !vm
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 3 Aug 2016 12:48:01 +0000 (14:48 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 4 Aug 2016 13:32:21 +0000 (15:32 +0200)
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@redhat.com>
src/libxl/libxl_migration.c

index 8be78772f203a0042fc958141bd9ec4335d3bb9b..f1da251c919ce2fe8ff4300768b4d1fdffc630cd 100644 (file)
@@ -296,7 +296,7 @@ libxlDoMigrateReceive(void *opaque)
     libxlDomainObjEndJob(driver, vm);
 
  cleanup:
-    if (remove_dom && vm) {
+    if (remove_dom) {
         virDomainObjListRemove(driver->domains, vm);
         vm = NULL;
     }