aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gcc-plugins/gcc-generate-rtl-pass.h
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2021-08-26 13:04:27 +0000
committerHerbert Xu <[email protected]>2021-09-24 07:58:41 +0000
commit505d9dcb0f7ddf9d075e729523a33d38642ae680 (patch)
tree692d9c16d80eada7f6e5a115c5c7d48d8aa8de61 /scripts/gcc-plugins/gcc-generate-rtl-pass.h
parentLinux 5.15-rc1 (diff)
downloadkernel-505d9dcb0f7ddf9d075e729523a33d38642ae680.tar.gz
kernel-505d9dcb0f7ddf9d075e729523a33d38642ae680.zip
crypto: ccp - fix resource leaks in ccp_run_aes_gcm_cmd()
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(沈明航)" <[email protected]> Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: John Allen <[email protected]> Tested-by: John Allen <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/gcc-generate-rtl-pass.h')
0 files changed, 0 insertions, 0 deletions