aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorJesper Juhl <jj@chaosbits.net>2011-01-23 18:56:36 +1100
committerHerbert Xu <herbert@gondor.apana.org.au>2011-01-23 18:59:17 +1100
commit7efd95f6270e210be90b94466bd3405b81e8d667 (patch)
tree6bd08a0e6ba2ce88dbdecdee0f7ea24e3f891587 /crypto
parent1bae4ce27c9c90344f23c65ea6966c50ffeae2f5 (diff)
downloadkernel_samsung_smdk4412-7efd95f6270e210be90b94466bd3405b81e8d667.zip
kernel_samsung_smdk4412-7efd95f6270e210be90b94466bd3405b81e8d667.tar.gz
kernel_samsung_smdk4412-7efd95f6270e210be90b94466bd3405b81e8d667.tar.bz2
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>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions