net/virtio: fix memory leak on failure
authorPengzhen Liu <liupengzhen3@huawei.com>
Fri, 27 Oct 2017 03:54:09 +0000 (11:54 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 12 Nov 2017 18:50:43 +0000 (19:50 +0100)
commit43d18765c027722424b2b0176fd4856c33ad7e6c
treee5aa9a21c572fd49f24e711db6f4cbe4218b8056
parent9bc2cbb007c0a3335c5582357ae9f6d37ea0b654
net/virtio: fix memory leak on failure

In function eth_virtio_dev_init(), dynamic memory stored
in "eth_dev->data->mac_addrs" variable and it is not freed
when function return,
this is a possible memory leak.

Fixes: 8ced1542f7a3 ("net/virtio: eth_dev->data->mac_addrs is not freed")
Cc: stable@dpdk.org
Signed-off-by: Pengzhen Liu <liupengzhen3@huawei.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
drivers/net/virtio/virtio_ethdev.c