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. Reported-by: [email protected] Fixes: cdec9cb ("crypto: GnuPG based MPI lib - source files...") Cc: <[email protected]> Signed-off-by: Herbert Xu <[email protected]> Reviewed-by: Eric Biggers <[email protected]> Signed-off-by: Herbert Xu <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
- Loading branch information