summaryrefslogtreecommitdiff
path: root/migration/ram.c
diff options
context:
space:
mode:
Diffstat (limited to 'migration/ram.c')
-rw-r--r--migration/ram.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/migration/ram.c b/migration/ram.c
index 844ea4694f..5f929d6195 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -1557,7 +1557,9 @@ static int postcopy_send_discard_bm_ram(MigrationState *ms,
} else {
discard_length = zero - one;
}
- postcopy_discard_send_range(ms, pds, one, discard_length);
+ if (discard_length) {
+ postcopy_discard_send_range(ms, pds, one, discard_length);
+ }
current = one + discard_length;
} else {
current = one;