aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'crypto')
-rw-r--r--crypto/ablkcipher.c2
-rw-r--r--crypto/blkcipher.c2
-rw-r--r--crypto/cipher.c2
-rw-r--r--crypto/hash.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/crypto/ablkcipher.c b/crypto/ablkcipher.c
index 1c166b47b4cc..3dbb1cc6eab5 100644
--- a/crypto/ablkcipher.c
+++ b/crypto/ablkcipher.c
@@ -35,7 +35,7 @@ static int setkey_unaligned(struct crypto_ablkcipher *tfm, const u8 *key, unsign
35 alignbuffer = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1); 35 alignbuffer = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1);
36 memcpy(alignbuffer, key, keylen); 36 memcpy(alignbuffer, key, keylen);
37 ret = cipher->setkey(tfm, alignbuffer, keylen); 37 ret = cipher->setkey(tfm, alignbuffer, keylen);
38 memset(alignbuffer, 0, absize); 38 memset(alignbuffer, 0, keylen);
39 kfree(buffer); 39 kfree(buffer);
40 return ret; 40 return ret;
41} 41}
diff --git a/crypto/blkcipher.c b/crypto/blkcipher.c
index 40a3dcff15bb..7755834b8846 100644
--- a/crypto/blkcipher.c
+++ b/crypto/blkcipher.c
@@ -352,7 +352,7 @@ static int setkey_unaligned(struct crypto_tfm *tfm, const u8 *key, unsigned int
352 alignbuffer = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1); 352 alignbuffer = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1);
353 memcpy(alignbuffer, key, keylen); 353 memcpy(alignbuffer, key, keylen);
354 ret = cipher->setkey(tfm, alignbuffer, keylen); 354 ret = cipher->setkey(tfm, alignbuffer, keylen);
355 memset(alignbuffer, 0, absize); 355 memset(alignbuffer, 0, keylen);
356 kfree(buffer); 356 kfree(buffer);
357 return ret; 357 return ret;
358} 358}
diff --git a/crypto/cipher.c b/crypto/cipher.c
index 0b2650c2014b..fc6b46f2a9b0 100644
--- a/crypto/cipher.c
+++ b/crypto/cipher.c
@@ -36,7 +36,7 @@ static int setkey_unaligned(struct crypto_tfm *tfm, const u8 *key, unsigned int
36 alignbuffer = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1); 36 alignbuffer = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1);
37 memcpy(alignbuffer, key, keylen); 37 memcpy(alignbuffer, key, keylen);
38 ret = cia->cia_setkey(tfm, alignbuffer, keylen); 38 ret = cia->cia_setkey(tfm, alignbuffer, keylen);
39 memset(alignbuffer, 0, absize); 39 memset(alignbuffer, 0, keylen);
40 kfree(buffer); 40 kfree(buffer);
41 return ret; 41 return ret;
42 42
diff --git a/crypto/hash.c b/crypto/hash.c
index 4d75ca7b57b2..4fd470bd729b 100644
--- a/crypto/hash.c
+++ b/crypto/hash.c
@@ -40,7 +40,7 @@ static int hash_setkey_unaligned(struct crypto_hash *crt, const u8 *key,
40 alignbuffer = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1); 40 alignbuffer = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1);
41 memcpy(alignbuffer, key, keylen); 41 memcpy(alignbuffer, key, keylen);
42 ret = alg->setkey(crt, alignbuffer, keylen); 42 ret = alg->setkey(crt, alignbuffer, keylen);
43 memset(alignbuffer, 0, absize); 43 memset(alignbuffer, 0, keylen);
44 kfree(buffer); 44 kfree(buffer);
45 return ret; 45 return ret;
46} 46}