crypto/mlx5: fix login release in probing and removal
authorMichael Baum <michaelba@nvidia.com>
Wed, 3 Nov 2021 18:35:08 +0000 (20:35 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 7 Nov 2021 15:20:35 +0000 (16:20 +0100)
commit801b4885c560dada87433ad282e5a9a71bd215ae
tree0385cb4df3d1e6d4ac7ac4a79ac4c67c181a8420
parent204891763c91185e1fe7ba9bfd2c225973c939b6
crypto/mlx5: fix login release in probing and removal

The probe function creates DevX object named login and saves pointer to
it in priv structure.

The remove function releases first the priv structure and then releases
the login object.
However, the pointer to login object is field of priv structure, which
is invalid.

Release the login object and then release the priv structure.

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