aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabiano Rosas <farosas@suse.de>2024-08-28 11:56:49 -0300
committerFabiano Rosas <farosas@suse.de>2024-09-03 16:24:37 -0300
commit90e0eeb99b2b3127a02d668488e0b7b921bcc810 (patch)
treeeab86932299d3fbbf377206d5d594092615ef536
parent405e352d28c24991cacfdebccf67d56c4795cf6e (diff)
downloadqemu-90e0eeb99b2b3127a02d668488e0b7b921bcc810.zip
qemu-90e0eeb99b2b3127a02d668488e0b7b921bcc810.tar.gz
qemu-90e0eeb99b2b3127a02d668488e0b7b921bcc810.tar.bz2
migration/multifd: Add a couple of asserts for p->iov
Check that p->iov is indeed always allocated and freed by the MultiFDMethods hooks. Suggested-by: Peter Xu <peterx@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
-rw-r--r--migration/multifd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/migration/multifd.c b/migration/multifd.c
index 2a8cd91..9b200f4 100644
--- a/migration/multifd.c
+++ b/migration/multifd.c
@@ -466,6 +466,7 @@ static bool multifd_send_cleanup_channel(MultiFDSendParams *p, Error **errp)
g_free(p->packet);
p->packet = NULL;
multifd_send_state->ops->send_cleanup(p, errp);
+ assert(!p->iov);
return *errp == NULL;
}
@@ -871,6 +872,7 @@ bool multifd_send_setup(void)
migrate_set_error(s, local_err);
goto err;
}
+ assert(p->iov);
}
return true;