summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorDinghao Liu <dinghao.liu@zju.edu.cn>2023-11-27 11:47:10 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2023-12-08 11:45:27 +0800
commita1c95dd5bc1d6a5d7a75a376c2107421b7d6240d (patch)
treea8db646d50d802d88f695cf9d04b8aadfed21385 /crypto
parentce852f1308ac738e61c5b2502517deea593a1554 (diff)
downloadlinux-a1c95dd5bc1d6a5d7a75a376c2107421b7d6240d.tar.gz
linux-a1c95dd5bc1d6a5d7a75a376c2107421b7d6240d.tar.bz2
linux-a1c95dd5bc1d6a5d7a75a376c2107421b7d6240d.zip
crypto: ccp - fix memleak in ccp_init_dm_workarea
When dma_map_single() fails, wa->address is supposed to be freed by the callers of ccp_init_dm_workarea() through ccp_dm_free(). However, many of the call spots don't expect to have to call ccp_dm_free() on failure of ccp_init_dm_workarea(), which may lead to a memleak. Let's free wa->address in ccp_init_dm_workarea() when dma_map_single() fails. Fixes: 63b945091a07 ("crypto: ccp - CCP device driver and interface support") Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> Acked-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions