diff options
Diffstat (limited to 'migration/qemu-file-channel.c')
| -rw-r--r-- | migration/qemu-file-channel.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/migration/qemu-file-channel.c b/migration/qemu-file-channel.c index 876d05a540..fad340ea7a 100644 --- a/migration/qemu-file-channel.c +++ b/migration/qemu-file-channel.c @@ -26,6 +26,7 @@ #include "qemu-file-channel.h" #include "qemu-file.h" #include "io/channel-socket.h" +#include "io/channel-tls.h" #include "qemu/iov.h" #include "qemu/yank.h" #include "yank_functions.h" @@ -106,7 +107,8 @@ static int channel_close(void *opaque, Error **errp) int ret; QIOChannel *ioc = QIO_CHANNEL(opaque); ret = qio_channel_close(ioc, errp); - if (object_dynamic_cast(OBJECT(ioc), TYPE_QIO_CHANNEL_SOCKET) + if ((object_dynamic_cast(OBJECT(ioc), TYPE_QIO_CHANNEL_SOCKET) || + object_dynamic_cast(OBJECT(ioc), TYPE_QIO_CHANNEL_TLS)) && OBJECT(ioc)->ref == 1) { yank_unregister_function(MIGRATION_YANK_INSTANCE, migration_yank_iochannel, |