From patchwork Wed Jun 12 21:41:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 250896 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 B07C82C009C for ; Thu, 13 Jun 2013 07:55:32 +1000 (EST) Received: from localhost ([::1]:57010 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Umt0s-00084M-MB for incoming@patchwork.ozlabs.org; Wed, 12 Jun 2013 17:55:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40305) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Umsrh-0006sg-3k for qemu-devel@nongnu.org; Wed, 12 Jun 2013 17:46:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Umsrf-0001G4-1a for qemu-devel@nongnu.org; Wed, 12 Jun 2013 17:46:00 -0400 Received: from mail-ie0-x22d.google.com ([2607:f8b0:4001:c03::22d]:57980) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Umsre-0001Fp-JD; Wed, 12 Jun 2013 17:45:58 -0400 Received: by mail-ie0-f173.google.com with SMTP id k13so5208981iea.4 for ; Wed, 12 Jun 2013 14:45:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=l9Kuqq7LMCoOV9VW4eb2CdqUZbky9RRENQg0XyFhk8M=; b=WkGeJa8QXAAk/BR16K2TZK8SmHMB8Iq5MZX5ELGBavkcquttFHP/Zz+jyk/xBTgCh+ Ia681H3auLwi44fB/6BfjkY0j9XUhtrifK1lycPPeKbZgIIzE1+BDLxLqkK7XjdMAm+p 8JcZtNQY/Zm48t5nlVAOC2iSOZ2qugGE7dnhKU2TlH71QzCHzZiDBVajdXyc3ZarF8PS GcMCM7fppJMaeBpGcm2SQXahpl59m15owjv9RxGoxv30GCr0oMza3r33HMqyRCVbJkkw Sm+wk3rIYjoSxsCL7fPXgLMJa1S6mE3KIZDVDYyQofRJ27NbEcmcIizMZcqXiN5ERwvf k5uw== X-Received: by 10.43.169.202 with SMTP id nn10mr8615346icc.4.1371073557999; Wed, 12 Jun 2013 14:45:57 -0700 (PDT) Received: from localhost ([32.97.110.51]) by mx.google.com with ESMTPSA id e9sm4214634igl.9.2013.06.12.14.45.56 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 12 Jun 2013 14:45:57 -0700 (PDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Wed, 12 Jun 2013 16:41:31 -0500 Message-Id: <1371073298-14519-20-git-send-email-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1371073298-14519-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1371073298-14519-1-git-send-email-mdroth@linux.vnet.ibm.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c03::22d Cc: qemu-stable@nongnu.org Subject: [Qemu-devel] [PATCH 19/26] 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 From: Stefan Hajnoczi 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 (cherry picked from commit 3ffee3cd5fb29de2115bdcbde0a02f47ce69a24c) Signed-off-by: Michael Roth --- 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)