linux/arch/x86/crypto
Jesper Juhl 7efd95f627 crypto: aesni-intel - Don't leak memory in rfc4106_set_hash_subkey
There's a small memory leak in 
arch/x86/crypto/aesni-intel_glue.c::rfc4106_set_hash_subkey(). If the call 
to kmalloc() fails and returns NULL then the memory allocated previously 
by ablkcipher_request_alloc() is not freed when we leave the function.

I could have just added a call to ablkcipher_request_free() before we 
return -ENOMEM, but that started to look too much like the code we 
already had at the end of the function, so I chose instead to rework the 
code a bit so that there are now a few labels at the end that we goto when 
various allocations fail, so we don't have to repeat the same blocks of 
code (this also reduces the object code size slightly).

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2011-01-23 18:59:17 +11:00
..
aes_glue.c crypto: aes - Export x86 AES encrypt/decrypt functions 2009-02-18 16:48:05 +08:00
aes-i586-asm_32.S crypto: aes - Export x86 AES encrypt/decrypt functions 2009-02-18 16:48:05 +08:00
aes-x86_64-asm_64.S crypto: aes - Export x86 AES encrypt/decrypt functions 2009-02-18 16:48:05 +08:00
aesni-intel_asm.S crypto: aesni-intel - Fixed build with binutils 2.16 2010-12-13 19:51:15 +08:00
aesni-intel_glue.c crypto: aesni-intel - Don't leak memory in rfc4106_set_hash_subkey 2011-01-23 18:59:17 +11:00
crc32c-intel.c crypto: crc32c-intel - Switch to shash 2008-12-25 11:01:37 +11:00
fpu.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ghash-clmulni-intel_asm.S crypto: ghash-clmulni-intel - Put proper .data section in place 2009-11-23 20:19:47 +08:00
ghash-clmulni-intel_glue.c crypto: ghash-intel - ghash-clmulni-intel_glue needs err.h 2010-12-15 19:44:08 +08:00
Makefile crypto: ghash - Add PCLMULQDQ accelerated implementation 2009-10-19 11:53:06 +09:00
salsa20_glue.c [CRYPTO] salsa20: Add x86-64 assembly version 2008-01-11 08:16:57 +11:00
salsa20-i586-asm_32.S [CRYPTO] salsa20_i586: Salsa20 stream cipher algorithm (i586 version) 2008-01-11 08:16:57 +11:00
salsa20-x86_64-asm_64.S [CRYPTO] salsa20: Add x86-64 assembly version 2008-01-11 08:16:57 +11:00
twofish_glue.c [CRYPTO] twofish: Merge common glue code 2008-01-14 17:07:57 +11:00
twofish-i586-asm_32.S tree-wide: Assorted spelling fixes 2010-02-09 11:13:56 +01:00
twofish-x86_64-asm_64.S tree-wide: Assorted spelling fixes 2010-02-09 11:13:56 +01:00