crypto/mlx5: fix leaks on probing failure
authorMichael Baum <michaelba@nvidia.com>
Thu, 29 Jul 2021 06:50:00 +0000 (09:50 +0300)
committerAkhil Goyal <gakhil@marvell.com>
Fri, 30 Jul 2021 19:08:19 +0000 (21:08 +0200)
commit56ec985f3141a3c01cf5d8cef2f26480abb83377
tree99837d8521b5dcb2f06fb69d1a5246b8e3f738dd
parent135e3a4046793e7f68a96d61fc6f0c03c365863c
crypto/mlx5: fix leaks on probing failure

In crypto driver probing, there are two validations after context
allocation.

When one of them fails, the context structure was not freed what caused
a memory leak.

Free it.

Fixes: debb27ea3442 ("crypto/mlx5: create login object using DevX")
Fixes: e8db4413cba5 ("crypto/mlx5: add keytag configuration")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/crypto/mlx5/mlx5_crypto.c