[PATCH 1/3] Fix memory leak in t-mpi-point test

Dmitry Eremin-Solenikov dbaryshkov at gmail.com
Sat Jul 13 16:50:05 CEST 2013


* tests/t-mpi-point.c (basic_ec_math, basic_ec_math_simplified): add
calls to gcry_ctx_release() to free contexts after they become unused.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
---
 tests/t-mpi-point.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/t-mpi-point.c b/tests/t-mpi-point.c
index 98236e7..3ee57dc 100644
--- a/tests/t-mpi-point.c
+++ b/tests/t-mpi-point.c
@@ -643,6 +643,7 @@ basic_ec_math (void)
   gcry_mpi_point_release (G);
   gcry_mpi_release (A);
   gcry_mpi_release (P);
+  gcry_ctx_release (ctx);
 }
 
 
@@ -761,6 +762,7 @@ basic_ec_math_simplified (void)
   gcry_mpi_point_release (Q);
   gcry_mpi_release (d);
   gcry_mpi_point_release (G);
+  gcry_ctx_release (ctx);
 }
 
 
-- 
1.7.10.4




More information about the Gcrypt-devel mailing list