aboutsummaryrefslogtreecommitdiff
path: root/chardev/char-socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'chardev/char-socket.c')
-rw-r--r--chardev/char-socket.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/chardev/char-socket.c b/chardev/char-socket.c
index 73947da188..7105753815 100644
--- a/chardev/char-socket.c
+++ b/chardev/char-socket.c
@@ -378,6 +378,10 @@ static void tcp_chr_free_connection(Chardev *chr)
char_socket_yank_iochannel,
QIO_CHANNEL(s->sioc));
}
+
+ if (s->ioc) {
+ qio_channel_close(s->ioc, NULL);
+ }
object_unref(OBJECT(s->sioc));
s->sioc = NULL;
object_unref(OBJECT(s->ioc));