From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36789) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anpXp-0001KD-7e for qemu-devel@nongnu.org; Wed, 06 Apr 2016 11:39:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anpXl-0000TL-DT for qemu-devel@nongnu.org; Wed, 06 Apr 2016 11:39:01 -0400 Received: from mail-qg0-x241.google.com ([2607:f8b0:400d:c04::241]:32913) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anpXl-0000TA-9Q for qemu-devel@nongnu.org; Wed, 06 Apr 2016 11:38:57 -0400 Received: by mail-qg0-x241.google.com with SMTP id 7so1872660qgj.0 for ; Wed, 06 Apr 2016 08:38:57 -0700 (PDT) Sender: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= From: marcandre.lureau@redhat.com Date: Wed, 6 Apr 2016 17:38:48 +0200 Message-Id: <1459957128-17685-3-git-send-email-marcandre.lureau@redhat.com> In-Reply-To: <1459957128-17685-1-git-send-email-marcandre.lureau@redhat.com> References: <1459957128-17685-1-git-send-email-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH 2/2] vhost-user: delete chardev on cleanup List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , n.nikolaev@virtualopensystems.com, mst@redhat.com From: Marc-André Lureau Remove the chardev implicitely when cleaning up the netdev. This prevents from reusing the chardev since it would be in an incorrect state with the slave. Signed-off-by: Marc-André Lureau --- net/vhost-user.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vhost-user.c b/net/vhost-user.c index 29fe097..2d7271a 100644 --- a/net/vhost-user.c +++ b/net/vhost-user.c @@ -144,6 +144,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.5.5