diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2019-06-24 13:32:26 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-10 10:56:43 +0300 |
commit | adbf2b44e8f1764662962dd0580d5dfab082caeb (patch) | |
tree | df7c7fb4d6565a14b9f756161dd289448952e8b9 /fs/btrfs/dev-replace.c | |
parent | 52e0b9fcd6f60cf66a30d33216aad6148bdaebb7 (diff) | |
download | linux-adbf2b44e8f1764662962dd0580d5dfab082caeb.tar.xz |
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: syzbot+f7baccc38dcc1e094e77@syzkaller.appspotmail.com
Fixes: cdec9cb5167a ("crypto: GnuPG based MPI lib - source files...")
Cc: <stable@vger.kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Reviewed-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions