mirror of
https://github.com/mii443/qemu.git
synced 2025-08-23 23:49:36 +00:00
Don't abort on memory allocation error
It is better to fail migration in case of failure to allocate new cache item Signed-off-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
committed by
Juan Quintela
parent
a17b2fd358
commit
89db9987c0
@ -284,7 +284,9 @@ static int save_xbzrle_page(QEMUFile *f, uint8_t *current_data,
|
||||
|
||||
if (!cache_is_cached(XBZRLE.cache, current_addr)) {
|
||||
if (!last_stage) {
|
||||
cache_insert(XBZRLE.cache, current_addr, current_data);
|
||||
if (cache_insert(XBZRLE.cache, current_addr, current_data) == -1) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
acct_info.xbzrle_cache_miss++;
|
||||
return -1;
|
||||
|
Reference in New Issue
Block a user