diff options
Diffstat (limited to 'migration')
-rw-r--r-- | migration/postcopy-ram.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index abe8c60a90..9b0477835f 100644 --- a/migration/postcopy-ram.c +++ b/migration/postcopy-ram.c @@ -604,7 +604,8 @@ void *postcopy_get_tmp_page(MigrationIncomingState *mis) mis->postcopy_tmp_page = mmap(NULL, getpagesize(), PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - if (!mis->postcopy_tmp_page) { + if (mis->postcopy_tmp_page == MAP_FAILED) { + mis->postcopy_tmp_page = NULL; error_report("%s: %s", __func__, strerror(errno)); return NULL; } |