net/vhost: fix double free of MAC address
authorHideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>
Wed, 19 Dec 2018 04:37:18 +0000 (13:37 +0900)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 21 Dec 2018 15:22:41 +0000 (16:22 +0100)
The common data freeing has been moved to rte_eth_dev_release_port(),
so freeing mac_addrs like this in eth_dev_close() is unnecessary and
will cause double free.

Fixes: e16adf08e54d ("ethdev: free all common data when releasing port")
Cc: stable@dpdk.org
Signed-off-by: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>
Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
drivers/net/vhost/rte_eth_vhost.c

index 42bdfcb..b2cda04 100644 (file)
@@ -1000,7 +1000,6 @@ eth_dev_close(struct rte_eth_dev *dev)
                for (i = 0; i < dev->data->nb_tx_queues; i++)
                        rte_free(dev->data->tx_queues[i]);
 
-       rte_free(dev->data->mac_addrs);
        free(internal->dev_name);
        free(internal->iface_name);
        rte_free(internal);