mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
rdma: bugfix: ram_control_save_page()
We were not checking for a valid 'bytes_sent' pointer before accessing it. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
a5f56b906e
commit
de7b685c9e
1 changed files with 1 additions and 1 deletions
2
savevm.c
2
savevm.c
|
@ -662,7 +662,7 @@ size_t ram_control_save_page(QEMUFile *f, ram_addr_t block_offset,
|
|||
offset, size, bytes_sent);
|
||||
|
||||
if (ret != RAM_SAVE_CONTROL_DELAYED) {
|
||||
if (*bytes_sent > 0) {
|
||||
if (bytes_sent && *bytes_sent > 0) {
|
||||
qemu_update_position(f, *bytes_sent);
|
||||
} else if (ret < 0) {
|
||||
qemu_file_set_error(f, ret);
|
||||
|
|
Loading…
Reference in a new issue