Re: [PATCH v2] crypto: api - check for ERR pointers in crypto_destroy_tfm()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 02, 2021 at 08:55:30AM +0100, Ard Biesheuvel wrote:
> diff --git a/include/crypto/hash.h b/include/crypto/hash.h
> index 13f8a6a54ca8..f065dbe2205c 100644
> --- a/include/crypto/hash.h
> +++ b/include/crypto/hash.h
> @@ -281,6 +281,8 @@ static inline struct crypto_tfm *crypto_ahash_tfm(struct crypto_ahash *tfm)
>  /**
>   * crypto_free_ahash() - zeroize and free the ahash handle
>   * @tfm: cipher handle to be freed
> + *
> + * If @tfm is a NULL or error pointer, this function does nothing.
>   */
>  static inline void crypto_free_ahash(struct crypto_ahash *tfm)
>  {

You missed crypto_free_shash().

Otherwise this looks good, feel free to add:

Reviewed-by: Eric Biggers <ebiggers@xxxxxxxxxx>

- Eric



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux