Pārlūkot izejas kodu

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 <herbert@gondor.apana.org.au>
Herbert Xu 16 gadi atpakaļ
vecāks
revīzija
412e87ae5d
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      include/crypto/hash.h

+ 1 - 1
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)
 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(
 static inline unsigned int crypto_shash_alignmask(