qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC PATCH 2/2] vhost-user: delete chardev on cleanup


From: marcandre . lureau
Subject: [Qemu-devel] [RFC PATCH 2/2] vhost-user: delete chardev on cleanup
Date: Thu, 3 Sep 2015 16:20:07 +0200

From: Marc-André Lureau <address@hidden>

Remove the chardev implicitely when cleaning up the netdev. This
prevents from reusing the chardev since it would be in an incorrect
state for the server.

Signed-off-by: Marc-André Lureau <address@hidden>
---
 net/vhost-user.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/vhost-user.c b/net/vhost-user.c
index 01df925..6660cdc 100644
--- a/net/vhost-user.c
+++ b/net/vhost-user.c
@@ -73,6 +73,7 @@ static void vhost_user_cleanup(NetClientState *nc)
     qemu_purge_queued_packets(nc);
 
     qemu_chr_fe_release(s->chr);
+    qemu_chr_delete(s->chr);
 }
 
 static bool vhost_user_has_vnet_hdr(NetClientState *nc)
-- 
2.4.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]