diff mbox

[PULL,29/53] qemu-char: remove all msgfds on disconnect

Message ID 1457708548-14093-30-git-send-email-mst@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Michael S. Tsirkin March 11, 2016, 3:09 p.m. UTC
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Disconnect should reset context.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 qemu-char.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/qemu-char.c b/qemu-char.c
index fc4611d..3813efd 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -2774,6 +2774,7 @@  static void tcp_chr_disconnect(CharDriverState *chr)
         s->listen_tag = qio_channel_add_watch(
             QIO_CHANNEL(s->listen_ioc), G_IO_IN, tcp_chr_accept, chr, NULL);
     }
+    tcp_set_msgfds(chr, NULL, 0);
     remove_fd_in_watch(chr);
     object_unref(OBJECT(s->sioc));
     s->sioc = NULL;