Message ID | 20180214153938.5410-2-dgilbert@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/migration/savevm.c b/migration/savevm.c index 3f611c02e8..68b652ff76 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -2284,8 +2284,7 @@ void qmp_xen_save_devices_state(const char *filename, bool has_live, bool live, f = qemu_fopen_channel_output(QIO_CHANNEL(ioc)); object_unref(OBJECT(ioc)); ret = qemu_save_device_state(f); - qemu_fclose(f); - if (ret < 0) { + if (ret < 0 || qemu_fclose(f) < 0) { error_setg(errp, QERR_IO_ERROR); } else { /* libxl calls the QMP command "stop" before calling