This repository has been archived by the owner on Sep 18, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib/mpi: Fix karactx leak in mpi_powm
commit c8ea9fce2baf7b643384f36f29e4194fa40d33a6 upstream. Sometimes mpi_powm will leak karactx because a memory allocation failure causes a bail-out that skips the freeing of karactx. This patch moves the freeing of karactx to the end of the function like everything else so that it can't be skipped. Change-Id: If8956b694455ac1564884191f20a0b3b8cd33c98 Reported-by: [email protected] Fixes: cdec9cb ("crypto: GnuPG based MPI lib - source files...") Signed-off-by: Herbert Xu <[email protected]> Reviewed-by: Eric Biggers <[email protected]> Signed-off-by: Herbert Xu <[email protected]> Signed-off-by: Ben Hutchings <[email protected]>
- Loading branch information