in case of an error argument list is not freed. Fixes: e72dd09b614e ("net/mlx5: add support for configuration through kvargs") CC: sta...@dpdk.org
Signed-off-by: Shahaf Shuler <shah...@mellanox.com> --- drivers/net/mlx5/mlx5.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 8da29d2..d527e5b 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -339,8 +339,10 @@ if (rte_kvargs_count(kvlist, params[i])) { ret = rte_kvargs_process(kvlist, params[i], mlx5_args_check, priv); - if (ret != 0) + if (ret != 0) { + rte_kvargs_free(kvlist); return ret; + } } } rte_kvargs_free(kvlist); -- 1.8.3.1