summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2013-03-20 15:18:08 +0100
committerWerner Koch <wk@gnupg.org>2013-03-20 15:18:08 +0100
commitde07974d807b703a2554d6ba885ea249e648bd44 (patch)
treeb2ee9389e8f50dee75b33bf4adab880e379c37f4
parent931e409e877d1e444edd53dead327ec8e64daf9a (diff)
downloadlibgcrypt-de07974d807b703a2554d6ba885ea249e648bd44.tar.gz
Fix a memory leak in the new EC code.
* cipher/ecc.c (point_from_keyparam): Always call mpi_free on A.
-rw-r--r--cipher/ecc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cipher/ecc.c b/cipher/ecc.c
index c23ba08b..8fcd57db 100644
--- a/cipher/ecc.c
+++ b/cipher/ecc.c
@@ -1763,10 +1763,10 @@ point_from_keyparam (gcry_mpi_point_t *r_a,
{
point = gcry_mpi_point_new (0);
ec = os2ec (point, a);
+ mpi_free (a);
if (ec)
{
gcry_mpi_point_release (point);
- mpi_free (a);
return ec;
}
}