[qemu-xen master] migration: Don't leak IO channels

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[qemu-xen master] migration: Don't leak IO channels

patchbot
commit b9eec804f4624a59d7a7347117f8bb3354c078fd
Author:     Ross Lagerwall <[hidden email]>
AuthorDate: Wed Nov 1 14:25:23 2017 +0000
Commit:     Michael Roth <[hidden email]>
CommitDate: Sun Feb 11 21:05:05 2018 -0600

    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 <[hidden email]>
    Message-Id: <[hidden email]>
    Reviewed-by: Daniel P. Berrange <[hidden email]>
    Signed-off-by: Dr. David Alan Gilbert <[hidden email]>
    (cherry picked from commit 032b79f7173051e7f8742a43d106c7fc526856f9)
    Signed-off-by: Michael Roth <[hidden email]>
---
 migration/savevm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/migration/savevm.c b/migration/savevm.c
index b7908f6..4d6c794 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);
--
generated by git-patchbot for /home/xen/git/qemu-xen.git#master

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog