aboutsummaryrefslogtreecommitdiff
path: root/migration.c
diff options
context:
space:
mode:
Diffstat (limited to 'migration.c')
-rw-r--r--migration.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/migration.c b/migration.c
index f41a40b491..260e5b5fc1 100644
--- a/migration.c
+++ b/migration.c
@@ -323,6 +323,10 @@ ssize_t migrate_fd_put_buffer(void *opaque, const void *data, size_t size)
FdMigrationState *s = opaque;
ssize_t ret;
+ if (s->state != MIG_STATE_ACTIVE) {
+ return -EIO;
+ }
+
do {
ret = s->write(s, data, size);
} while (ret == -1 && ((s->get_error(s)) == EINTR));