migration: Fix block migration flag case

Fix the case where when a migration with a bad protocol is tried,
we leave the block migration capability set.

(This is a cut down version of my 'migration: Fix block failure cases'
where it's other case was fixed by Peter's dd0ee30cae )

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20180316202114.32345-1-dgilbert@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
Dr. David Alan Gilbert 2018-03-16 20:21:14 +00:00
parent b47d1e9fe0
commit 09576e74db
1 changed files with 1 additions and 0 deletions

View File

@ -1428,6 +1428,7 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
"a valid migration protocol"); "a valid migration protocol");
migrate_set_state(&s->state, MIGRATION_STATUS_SETUP, migrate_set_state(&s->state, MIGRATION_STATUS_SETUP,
MIGRATION_STATUS_FAILED); MIGRATION_STATUS_FAILED);
block_cleanup_parameters(s);
return; return;
} }