> +
> +static void
> +mlx5_crypto_sym_session_clear(struct rte_cryptodev *dev,
> +                           struct rte_cryptodev_sym_session *sess)
> +{
> +     struct mlx5_crypto_priv *priv = dev->data->dev_private;
> +     struct mlx5_crypto_session *sess_private_data =
> +                     get_sym_session_private_data(sess, dev->driver_id);
> +
> +     if (unlikely(sess_private_data == NULL)) {
> +             DRV_LOG(ERR, "Failed to get session %p private data.",
> +                             sess_private_data);
> +             return;
> +     }
> +     mlx5_crypto_dek_destroy(priv, sess_private_data->dek);
> +     DRV_LOG(DEBUG, "Session %p was cleared.", sess_private_data);
> +}

Memory leakage, mempool is not freed.
IMO, this driver is not properly tested with the unit test app.
Please add a note in the documentation that it is tested with autotest.


Reply via email to