diff options
author | Ross Lagerwall <ross.lagerwall@citrix.com> | 2017-11-01 14:25:23 +0000 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2018-02-06 14:53:02 +0000 |
commit | 032b79f7173051e7f8742a43d106c7fc526856f9 (patch) | |
tree | c165716884a7f43af837aae1aa0e00d05ad2280e /migration | |
parent | 6039dd5b1c45d76403b9dcadd2afd7efd8f42330 (diff) |
migration: Don't leak IO channels
Since qemu_fopen_channel_{in,out}put take references on the underlying
IO channels, make sure to release our references to them.
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Message-Id: <20171101142526.1006-2-ross.lagerwall@citrix.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r-- | migration/savevm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/migration/savevm.c b/migration/savevm.c index b8e9c532af..b024ee3b22 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -2266,6 +2266,7 @@ void qmp_xen_save_devices_state(const char *filename, bool has_live, bool live, } qio_channel_set_name(QIO_CHANNEL(ioc), "migration-xen-save-state"); f = qemu_fopen_channel_output(QIO_CHANNEL(ioc)); + object_unref(OBJECT(ioc)); ret = qemu_save_device_state(f); qemu_fclose(f); if (ret < 0) { @@ -2313,6 +2314,7 @@ void qmp_xen_load_devices_state(const char *filename, Error **errp) } qio_channel_set_name(QIO_CHANNEL(ioc), "migration-xen-load-state"); f = qemu_fopen_channel_input(QIO_CHANNEL(ioc)); + object_unref(OBJECT(ioc)); ret = qemu_loadvm_state(f); qemu_fclose(f); |