1b2c17d60d
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>