mirror of https://github.com/xemu-project/xemu.git
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>
This commit is contained in:
parent
02d9c38236
commit
a701c03dec
|
@ -94,6 +94,7 @@ void file_start_outgoing_migration(MigrationState *s,
|
||||||
|
|
||||||
ioc = QIO_CHANNEL(fioc);
|
ioc = QIO_CHANNEL(fioc);
|
||||||
if (offset && qio_channel_io_seek(ioc, offset, SEEK_SET, errp) < 0) {
|
if (offset && qio_channel_io_seek(ioc, offset, SEEK_SET, errp) < 0) {
|
||||||
|
object_unref(OBJECT(fioc));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
qio_channel_set_name(ioc, "migration-file-outgoing");
|
qio_channel_set_name(ioc, "migration-file-outgoing");
|
||||||
|
|
Loading…
Reference in New Issue