提交 de7b685c 编写于 作者: M Michael R. Hines 提交者: Juan Quintela

rdma: bugfix: ram_control_save_page()

We were not checking for a valid 'bytes_sent' pointer before accessing it.
Reviewed-by: NEric Blake <eblake@redhat.com>
Signed-off-by: NMichael R. Hines <mrhines@us.ibm.com>
Signed-off-by: NJuan Quintela <quintela@redhat.com>
上级 a5f56b90
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册