From patchwork Mon Jun 17 15:05:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 54847 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 466891BEF6; Mon, 17 Jun 2019 17:05:52 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 2F5A92BE6 for ; Mon, 17 Jun 2019 17:05:51 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 27C36356E8; Mon, 17 Jun 2019 15:05:46 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.205.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id D760E5944E; Mon, 17 Jun 2019 15:05:40 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, ferruh.yigit@intel.com, Rastislav Cernay , Jan Remes Date: Mon, 17 Jun 2019 17:05:22 +0200 Message-Id: <1560783924-5355-2-git-send-email-david.marchand@redhat.com> In-Reply-To: <1560783924-5355-1-git-send-email-david.marchand@redhat.com> References: <1560783924-5355-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 17 Jun 2019 15:05:48 +0000 (UTC) Subject: [dpdk-dev] [PATCH 1/3] net/nfb: avoid memory leak on unplug X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Clearing mac_addrs on remove will prevent ethdev from freeing it. Fixes: 6435f9a0ac22 ("net/nfb: add new netcope driver") Signed-off-by: David Marchand Reviewed-by: Ferruh Yigit --- drivers/net/nfb/nfb_ethdev.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/nfb/nfb_ethdev.c b/drivers/net/nfb/nfb_ethdev.c index fdd0e70..6f77864 100644 --- a/drivers/net/nfb/nfb_ethdev.c +++ b/drivers/net/nfb/nfb_ethdev.c @@ -510,8 +510,6 @@ struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev); struct rte_pci_addr *pci_addr = &pci_dev->addr; - dev->data->mac_addrs = NULL; - nfb_nc_rxmac_deinit(internals->rxmac, internals->max_rxmac); nfb_nc_txmac_deinit(internals->txmac, internals->max_txmac);