mirror of https://gitee.com/openkylin/qemu.git
Unlock ramlist lock also in error case
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
47f4dac3fd
commit
fb3409de22
|
@ -642,12 +642,13 @@ static int ram_save_iterate(QEMUFile *f, void *opaque)
|
|||
i++;
|
||||
}
|
||||
|
||||
qemu_mutex_unlock_ramlist();
|
||||
|
||||
if (ret < 0) {
|
||||
bytes_transferred += total_sent;
|
||||
return ret;
|
||||
}
|
||||
|
||||
qemu_mutex_unlock_ramlist();
|
||||
qemu_put_be64(f, RAM_SAVE_FLAG_EOS);
|
||||
total_sent += 8;
|
||||
bytes_transferred += total_sent;
|
||||
|
|
Loading…
Reference in New Issue