net/ark: fix null pointer dereference
authorJohn Miller <john.miller@atomicrules.com>
Tue, 16 May 2017 16:14:17 +0000 (12:14 -0400)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 12 Jun 2017 09:41:25 +0000 (10:41 +0100)
Coverity issue: 144520
Fixes: 727b3fe292bc ("net/ark: integrate PMD")
Cc: stable@dpdk.org
Signed-off-by: John Miller <john.miller@atomicrules.com>
drivers/net/ark/ark_ethdev.c

index 07b7ddc..94dee0b 100644 (file)
@@ -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;
 }