diff options
author | Michael R. Hines <mrhines@us.ibm.com> | 2013-07-22 10:01:52 -0400 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2013-07-23 11:11:59 +0200 |
commit | de7b685c9e1cf606e37e7116e4c4f03a6ae2d14f (patch) | |
tree | 38ede7e31a5c9f2474ec36c29a5c5cc80c97d1d4 /savevm.c | |
parent | a5f56b906e0d7975b87dc3d3c5bfe5a75a4028d2 (diff) | |
download | qemu-de7b685c9e1cf606e37e7116e4c4f03a6ae2d14f.tar.gz qemu-de7b685c9e1cf606e37e7116e4c4f03a6ae2d14f.tar.bz2 qemu-de7b685c9e1cf606e37e7116e4c4f03a6ae2d14f.zip |
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>
Diffstat (limited to 'savevm.c')
-rw-r--r-- | savevm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |