Warning detected by Coverity. No need for the NULL check, and
removing it silences the warning without any semantic change.
* src/qemu/qemu_migration.c (qemuMigrationFinish): All entries to
endjob had non-NULL vm.
VIR_WARN("Unable to encode migration cookie");
endjob:
- if (vm) {
- if (qemuMigrationJobFinish(driver, vm) == 0) {
- vm = NULL;
- } else if (!vm->persistent && !virDomainObjIsActive(vm)) {
- virDomainRemoveInactive(&driver->domains, vm);
- vm = NULL;
- }
+ if (qemuMigrationJobFinish(driver, vm) == 0) {
+ vm = NULL;
+ } else if (!vm->persistent && !virDomainObjIsActive(vm)) {
+ virDomainRemoveInactive(&driver->domains, vm);
+ vm = NULL;
}
cleanup: