mirror of
https://github.com/qemu/qemu.git
synced 2024-11-23 19:03:38 +08:00
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>
This commit is contained in:
parent
405e352d28
commit
90e0eeb99b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user