aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabiano Rosas <farosas@suse.de>2024-06-17 15:57:16 -0300
committerFabiano Rosas <farosas@suse.de>2024-06-20 10:42:23 -0300
commita701c03decf140c7666edee1301e151714e50a72 (patch)
tree52c91542883e156c0a098be5ba175f4d17e859b9
parent02d9c38236cf8c9826e5c5be61780c4444cb4ae0 (diff)
downloadqemu-a701c03decf140c7666edee1301e151714e50a72.zip
qemu-a701c03decf140c7666edee1301e151714e50a72.tar.gz
qemu-a701c03decf140c7666edee1301e151714e50a72.tar.bz2
migration: Drop reference to QIOChannel if file seeking fails
We forgot to drop the reference to the QIOChannel in the error path of the offset adjustment. Do it now. Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
-rw-r--r--migration/file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/migration/file.c b/migration/file.c
index ab18ba5..2bb8c64 100644
--- a/migration/file.c
+++ b/migration/file.c
@@ -94,6 +94,7 @@ void file_start_outgoing_migration(MigrationState *s,
ioc = QIO_CHANNEL(fioc);
if (offset && qio_channel_io_seek(ioc, offset, SEEK_SET, errp) < 0) {
+ object_unref(OBJECT(fioc));
return;
}
qio_channel_set_name(ioc, "migration-file-outgoing");