From patchwork Fri Jun 7 13:54:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 249728 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 8001B2C008F for ; Fri, 7 Jun 2013 23:55:35 +1000 (EST) Received: from localhost ([::1]:38488 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ukx8f-00059w-Je for incoming@patchwork.ozlabs.org; Fri, 07 Jun 2013 09:55:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34122) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ukx87-00051m-Vw for qemu-devel@nongnu.org; Fri, 07 Jun 2013 09:55:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ukx83-0002B1-55 for qemu-devel@nongnu.org; Fri, 07 Jun 2013 09:54:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20688) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ukx82-0002At-T9; Fri, 07 Jun 2013 09:54:55 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r57DssOE012708 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 7 Jun 2013 09:54:54 -0400 Received: from localhost (ovpn-112-30.ams2.redhat.com [10.36.112.30]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r57Dsqde004940; Fri, 7 Jun 2013 09:54:53 -0400 From: Stefan Hajnoczi To: Date: Fri, 7 Jun 2013 15:54:47 +0200 Message-Id: <1370613288-14933-2-git-send-email-stefanha@redhat.com> In-Reply-To: <1370613288-14933-1-git-send-email-stefanha@redhat.com> References: <1370613288-14933-1-git-send-email-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Anthony Liguori , qemu-stable@nongnu.org, Stefan Hajnoczi Subject: [Qemu-devel] [PULL 1/2] vmxnet3: fix NICState cleanup X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Use qemu_del_nic() instead of qemu_del_net_client() to correctly free the entire NICState. Cc: qemu-stable@nongnu.org Reported-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi --- hw/net/vmxnet3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 5f483e7..4c575e5 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -1892,7 +1892,7 @@ static void vmxnet3_net_uninit(VMXNET3State *s) vmxnet_tx_pkt_reset(s->tx_pkt); vmxnet_tx_pkt_uninit(s->tx_pkt); vmxnet_rx_pkt_uninit(s->rx_pkt); - qemu_del_net_client(qemu_get_queue(s->nic)); + qemu_del_nic(s->nic); } static void vmxnet3_net_init(VMXNET3State *s)