Hi,
Here are the fixes for the dup() issues found by Coverity.
@Peter Xu, I fixed the leak you found, but I'm holding on to that patch
because I noticed we're not freeing the ioc in the error paths. I'll
need to add some infrastructure to be able to cancel the glib polling
(qio_channel_add_watch_full) when the channel creation fails before
the source has connnected.
CI run: https://gitlab.com/farosas/qemu/-/pipelines/1209529440
Fabiano Rosas (2):
io: Introduce qio_channel_file_new_dupfd
migration: Fix error handling after dup in file migration
include/io/channel-file.h | 18 ++++++++++++++++++
io/channel-file.c | 12 ++++++++++++
migration/fd.c | 9 ++++-----
migration/file.c | 14 +++++++-------
4 files changed, 41 insertions(+), 12 deletions(-)
--
2.35.3