Yunjian Wang 1b2c17d60d net/mvpp2: fix memory leak in error path
In mrvl_create() allocated memory for 'mtr', we don't free it
when profile get fails and it will lead to memory leak.

We can get profile at the beginning of the function to
fix it, before calling mtr = rte_zmalloc_socket().

Fixes: cdb53f8da628 ("net/mvpp2: support metering")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Liron Himi <lironh@marvell.com>
2020-11-03 23:24:26 +01:00
..
2020-05-21 15:41:48 +02:00
2018-09-28 01:41:03 +02:00
2018-09-28 01:41:03 +02:00
2020-09-18 18:55:10 +02:00
2018-09-28 01:41:03 +02:00