Message ID | 20171101142526.1006-2-ross.lagerwall@citrix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 11/01/2017 02:25 PM, Ross Lagerwall wrote: > 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> > --- > New in v2. > > migration/savevm.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/migration/savevm.c b/migration/savevm.c > index 4a88228..87557dd 100644 > --- a/migration/savevm.c > +++ b/migration/savevm.c > @@ -2259,6 +2259,7 @@ void qmp_xen_save_devices_state(const char *filename, Error **errp) > } > 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) { > @@ -2292,6 +2293,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); > Ping for review... Thanks,
On Wed, Nov 01, 2017 at 02:25:23PM +0000, Ross Lagerwall wrote: > 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> > --- > New in v2. > > migration/savevm.c | 2 ++ > 1 file changed, 2 insertions(+) Reviewed-by: Daniel P. Berrange <berrange@redhat.com> > > diff --git a/migration/savevm.c b/migration/savevm.c > index 4a88228..87557dd 100644 > --- a/migration/savevm.c > +++ b/migration/savevm.c > @@ -2259,6 +2259,7 @@ void qmp_xen_save_devices_state(const char *filename, Error **errp) > } > 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) { > @@ -2292,6 +2293,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); > -- > 2.9.5 > > Regards, Daniel
* Ross Lagerwall (ross.lagerwall@citrix.com) wrote: > 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> Queued for migration. Dave > --- > New in v2. > > migration/savevm.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/migration/savevm.c b/migration/savevm.c > index 4a88228..87557dd 100644 > --- a/migration/savevm.c > +++ b/migration/savevm.c > @@ -2259,6 +2259,7 @@ void qmp_xen_save_devices_state(const char *filename, Error **errp) > } > 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) { > @@ -2292,6 +2293,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); > -- > 2.9.5 > > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
diff --git a/migration/savevm.c b/migration/savevm.c index 4a88228..87557dd 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -2259,6 +2259,7 @@ void qmp_xen_save_devices_state(const char *filename, Error **errp) } 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) { @@ -2292,6 +2293,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);
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> --- New in v2. migration/savevm.c | 2 ++ 1 file changed, 2 insertions(+)