Skip to content
Commit 98b5ef3e authored by Colin Ian King's avatar Colin Ian King Committed by Herbert Xu
Browse files

crypto: sun8i-ss - Fix memory leak of object d when dma_iv fails to map



In the case where the dma_iv mapping fails, the return error path leaks
the memory allocated to object d.  Fix this by adding a new error return
label and jumping to this to ensure d is free'd before the return.

Addresses-Coverity: ("Resource leak")
Fixes: ac2614d7 ("crypto: sun8i-ss - Add support for the PRNG")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Acked-by: default avatarCorentin Labbe <clabbe.montjoie@gmail.com>
Tested-by: default avatarCorentin Labbe <clabbe.montjoie@gmail.com>
Acked-by: default avatarCorentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 3729095c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment