mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-02 21:32:52 +00:00
migration: Fix early failure cleanup
Avoid crash in cleanup after a very early migration failure
(possibly due to my 688a3dcba9
'Route errors down ...')
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20180212160340.15333-2-dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
This commit is contained in:
parent
17ca7746d7
commit
b9ccaf6d74
1 changed files with 7 additions and 5 deletions
|
@ -1602,12 +1602,14 @@ static void xbzrle_load_cleanup(void)
|
|||
|
||||
static void ram_state_cleanup(RAMState **rsp)
|
||||
{
|
||||
if (*rsp) {
|
||||
migration_page_queue_free(*rsp);
|
||||
qemu_mutex_destroy(&(*rsp)->bitmap_mutex);
|
||||
qemu_mutex_destroy(&(*rsp)->src_page_req_mutex);
|
||||
g_free(*rsp);
|
||||
*rsp = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void xbzrle_cleanup(void)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue