ed1c45b qemu: migration: Don't crash on access to 'current' job

Authored and Committed by Peter Krempa 5 years ago
    qemu: migration: Don't crash on access to 'current' job
    
    When a VM is destroyed while being migrated (waiting in
    qemuMigrationSrcWaitForCompletion) the private object cleanup code frees
    the 'current' job info. Since the migration code attempts to setup
    various aspects of the current job even on failure this results into a
    crash.
    
    Job data is cleared in qemuDomainObjPrivateDataClear since commit
    888aa4b6b9db
    
    Fix this by skipping all of the code which requires the qemu process to
    be alive if the VM is not active any more.
    
    Signed-off-by: Peter Krempa <pkrempa@redhat.com>
    Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
    
        
file modified
+17 -16