summaryrefslogtreecommitdiff
path: root/lib/timerqueue.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2021-08-26 16:04:27 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-10-06 15:05:10 +0200
commit3707e37b3fcef4d5e9a81b9c2c48ba7248051c2a (patch)
treef2f1da9118a93b133dd224ea54506e73a7912d61 /lib/timerqueue.c
parent1a4089d9f9b3312e8e9c8d58945978160bdc55a7 (diff)
crypto: ccp - fix resource leaks in ccp_run_aes_gcm_cmd()
commit 505d9dcb0f7ddf9d075e729523a33d38642ae680 upstream. There are three bugs in this code: 1) If we ccp_init_data() fails for &src then we need to free aad. Use goto e_aad instead of goto e_ctx. 2) The label to free the &final_wa was named incorrectly as "e_tag" but it should have been "e_final_wa". One error path leaked &final_wa. 3) The &tag was leaked on one error path. In that case, I added a free before the goto because the resource was local to that block. Fixes: 36cf515b9bbe ("crypto: ccp - Enable support for AES GCM on v5 CCPs") Reported-by: "minihanshen(沈明航)" <minihanshen@tencent.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: John Allen <john.allen@amd.com> Tested-by: John Allen <john.allen@amd.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/timerqueue.c')
0 files changed, 0 insertions, 0 deletions