]> git.droids-corp.org - dpdk.git/blobdiff - drivers/net/null/rte_eth_null.c
app/procinfo: add --show-mempool
[dpdk.git] / drivers / net / null / rte_eth_null.c
index 1e8237a41b6bc41dd38d94fd602ea9b651f34e86..159c1c1fdd1cc11218cc5cda0e635c254fefe115 100644 (file)
@@ -679,10 +679,9 @@ rte_pmd_null_remove(struct rte_vdev_device *dev)
        if (eth_dev == NULL)
                return -1;
 
-       if (rte_eal_process_type() != RTE_PROC_PRIMARY)
-               return rte_eth_dev_release_port_secondary(eth_dev);
-
-       rte_free(eth_dev->data->dev_private);
+       if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+               /* mac_addrs must not be freed alone because part of dev_private */
+               eth_dev->data->mac_addrs = NULL;
 
        rte_eth_dev_release_port(eth_dev);