X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fnull%2Frte_eth_null.c;h=159c1c1fdd1cc11218cc5cda0e635c254fefe115;hb=0101a0ec621757850210fa084c2d4158404125e3;hp=1e8237a41b6bc41dd38d94fd602ea9b651f34e86;hpb=4852aa8f6e2125664698afc43b820bd787b02756;p=dpdk.git diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c index 1e8237a41b..159c1c1fdd 100644 --- a/drivers/net/null/rte_eth_null.c +++ b/drivers/net/null/rte_eth_null.c @@ -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);