From: John Miller Date: Tue, 16 May 2017 16:14:17 +0000 (-0400) Subject: net/ark: fix null pointer dereference X-Git-Tag: spdx-start~3163 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=bc10f22b6d294a8884b37ffeb84c7ed7dca04753;p=dpdk.git net/ark: fix null pointer dereference Coverity issue: 144520 Fixes: 727b3fe292bc ("net/ark: integrate PMD") Cc: stable@dpdk.org Signed-off-by: John Miller --- 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; }