From: Michal Privoznik Date: Wed, 3 Aug 2016 12:48:01 +0000 (+0200) Subject: libxlDoMigrateReceive: Drop useless check for !vm X-Git-Tag: v2.2.0-rc1~154 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3df357da60815081259bfe3ad2a5a2ed6a8b974;p=thirdparty%2Flibvirt.git libxlDoMigrateReceive: Drop useless check for !vm 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 --- diff --git a/src/libxl/libxl_migration.c b/src/libxl/libxl_migration.c index 8be78772f2..f1da251c91 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; }