Mailing List Archive

[PATCH 8/8] ecc-ecdh: fix memory leak
* cipher/ecc-ecdh.c (_gcry_ecc_mul_point): Free 'ec' at function exit.
--

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
---
cipher/ecc-ecdh.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/cipher/ecc-ecdh.c b/cipher/ecc-ecdh.c
index 43eb731a..d6b8991a 100644
--- a/cipher/ecc-ecdh.c
+++ b/cipher/ecc-ecdh.c
@@ -122,5 +122,6 @@ _gcry_ecc_mul_point (int curveid, unsigned char *result,
_gcry_mpi_release (x);
point_free (&Q);
_gcry_mpi_release (mpi_k);
+ _gcry_mpi_ec_free (ec);
return err;
}
--
2.27.0


_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel