From: Herbert Xu Date: Thu, 5 Feb 2009 05:51:25 +0000 (+1100) Subject: crypto: shash - Fix tfm destruction X-Git-Tag: v2.6.29-rc5~51^2~1 X-Git-Url: http://ftp.safe.ca/?p=safe%2Fjmp%2Flinux-2.6;a=commitdiff_plain;h=412e87ae5d852bc3d836f475c19d954b3324363d crypto: shash - Fix tfm destruction 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 --- diff --git a/include/crypto/hash.h b/include/crypto/hash.h index cd16d6e..d797e11 100644 --- a/include/crypto/hash.h +++ b/include/crypto/hash.h @@ -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(