When nfp_pf_create_dev() is cleaning up, it does not correctly set
the dev_private variable to NULL, which will lead to a double free.
Fixes:
ef28aa96e53b ("net/nfp: support multiprocess")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
probe_failed:
rte_free(port_name);
/* free ports private data if primary process */
- if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+ if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
rte_free(eth_dev->data->dev_private);
-
+ eth_dev->data->dev_private = NULL;
+ }
rte_eth_dev_release_port(eth_dev);
return retval;