From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 88AA7A0597; Thu, 9 Apr 2020 03:59:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 165801C134; Thu, 9 Apr 2020 03:59:15 +0200 (CEST) Received: from huawei.com (szxga06-in.huawei.com [45.249.212.32]) by dpdk.org (Postfix) with ESMTP id 387901C11F; Thu, 9 Apr 2020 03:59:13 +0200 (CEST) Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 87C702FF11244351A3E8; Thu, 9 Apr 2020 09:59:11 +0800 (CST) Received: from localhost (10.173.251.152) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.487.0; Thu, 9 Apr 2020 09:59:01 +0800 From: wangyunjian To: CC: , , , , , Yunjian Wang , Date: Thu, 9 Apr 2020 09:59:00 +0800 Message-ID: <1586397540-19668-1-git-send-email-wangyunjian@huawei.com> X-Mailer: git-send-email 1.9.5.msysgit.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.173.251.152] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH v2] net/pfe: fix double free of MAC address 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" From: Yunjian Wang The 'mac_addrs' freeing has been moved to rte_eth_dev_release_port(), so freeing 'mac_addrs' like this in pfe_eth_exit() is unnecessary and will cause double free. Fixes: 67fc3ff97c39 ("net/pfe: introduce basic functions") CC: stable@dpdk.org Signed-off-by: Yunjian Wang --- v2: * remove 'rte_free(dev->data->mac_addrs);' suggested by Ferruh Yigit * update commit log --- drivers/net/pfe/pfe_ethdev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c index 940347819..383be4397 100644 --- a/drivers/net/pfe/pfe_ethdev.c +++ b/drivers/net/pfe/pfe_ethdev.c @@ -396,7 +396,6 @@ pfe_eth_exit(struct rte_eth_dev *dev, struct pfe *pfe) /* Close the device file for link status */ pfe_eth_close_cdev(dev->data->dev_private); - rte_free(dev->data->mac_addrs); rte_eth_dev_release_port(dev); pfe->nb_devs--; } -- 2.19.1