aboutsummaryrefslogtreecommitdiff
path: root/arch_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch_init.c')
-rw-r--r--arch_init.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch_init.c b/arch_init.c
index 1fa5f1fdd4..80574a090c 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -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;