ca3484d5ca
[ Upstream commit a1c95dd5bc1d6a5d7a75a376c2107421b7d6240d ]
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:
|
||
---|---|---|
.. | ||
ccp-crypto-aes-cmac.c | ||
ccp-crypto-aes-galois.c | ||
ccp-crypto-aes-xts.c | ||
ccp-crypto-aes.c | ||
ccp-crypto-des3.c | ||
ccp-crypto-main.c | ||
ccp-crypto-rsa.c | ||
ccp-crypto-sha.c | ||
ccp-crypto.h | ||
ccp-debugfs.c | ||
ccp-dev-v3.c | ||
ccp-dev-v5.c | ||
ccp-dev.c | ||
ccp-dev.h | ||
ccp-dmaengine.c | ||
ccp-ops.c | ||
Kconfig | ||
Makefile | ||
psp-dev.c | ||
psp-dev.h | ||
sp-dev.c | ||
sp-dev.h | ||
sp-pci.c | ||
sp-platform.c |