From bc10f22b6d294a8884b37ffeb84c7ed7dca04753 Mon Sep 17 00:00:00 2001 From: John Miller Date: Tue, 16 May 2017 12:14:17 -0400 Subject: [PATCH] net/ark: fix null pointer dereference Coverity issue: 144520 Fixes: 727b3fe292bc ("net/ark: integrate PMD") Cc: stable@dpdk.org Signed-off-by: John Miller --- drivers/net/ark/ark_ethdev.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c index 07b7ddc771..94dee0b461 100644 --- a/drivers/net/ark/ark_ethdev.c +++ b/drivers/net/ark/ark_ethdev.c @@ -516,11 +516,7 @@ eth_ark_dev_uninit(struct rte_eth_dev *dev) dev->dev_ops = NULL; dev->rx_pkt_burst = NULL; dev->tx_pkt_burst = NULL; - if (dev->data->mac_addrs) - rte_free(dev->data->mac_addrs); - if (dev->data) - rte_free(dev->data); - + rte_free(dev->data->mac_addrs); return 0; } -- 2.20.1