regex/mlx5: fix leak on device removal
authorMichael Baum <michaelba@nvidia.com>
Mon, 12 Jul 2021 07:06:43 +0000 (10:06 +0300)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 22 Jul 2021 13:19:31 +0000 (15:19 +0200)
commita1fcde8c8083233d0ef747ae9156c23e8c65ae73
tree366f12c5bef56b0bb11811bb2190d891f4d43ef3
parent29ca3215f391c8b1af866341e95c3249631f9679
regex/mlx5: fix leak on device removal

In the removal function, PMD releases all driver resources allocated
in the probe function.

The MR btree memory is allocated in the probe function, but it is not
freed in remove function what caused a memory leak.

Release it.

Fixes: cda883bbb655 ("regex/mlx5: add dynamic memory registration to datapath")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
drivers/regex/mlx5/mlx5_regex.c