Add missing check for host_from_stream_offset return value for RAM_SAVE_FLAG_PAGE

Signed-off-by: Orit Wasserman <owasserm@redhat.com>
This commit is contained in:
Orit Wasserman 2012-06-19 11:51:37 +03:00 committed by Juan Quintela
parent 71ea2e0161
commit 0ff1f9f585

View file

@ -483,6 +483,9 @@ int ram_load(QEMUFile *f, void *opaque, int version_id)
void *host;
host = host_from_stream_offset(f, addr, flags);
if (!host) {
return -EINVAL;
}
qemu_get_buffer(f, host, TARGET_PAGE_SIZE);
}