Skip to content

Commit

Permalink
crypto: shash - Fix tfm destruction
Browse files Browse the repository at this point in the history
We were freeing an offset into the slab object instead of the
start.  This patch fixes it by calling crypto_destroy_tfm which
allows the correct address to be given.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Herbert Xu committed Feb 5, 2009
1 parent 7b2cd92 commit 412e87a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/crypto/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ static inline struct crypto_tfm *crypto_shash_tfm(struct crypto_shash *tfm)

static inline void crypto_free_shash(struct crypto_shash *tfm)
{
crypto_free_tfm(crypto_shash_tfm(tfm));
crypto_destroy_tfm(tfm, crypto_shash_tfm(tfm));
}

static inline unsigned int crypto_shash_alignmask(
Expand Down

0 comments on commit 412e87a

Please sign in to comment.