summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2012-03-16 08:26:42 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2012-03-16 08:26:42 +0100
commit65f3c370a25a604bb3fa085c3dff99e0312c6f04 (patch)
treef7aefa49ed96f3efea70e2a788e6aae76339da26
parenta113a913975a06e9760a02d3b39b80c615e40fe7 (diff)
downloadgnutls-65f3c370a25a604bb3fa085c3dff99e0312c6f04.tar.gz
corrected memory leaks in prime generation.
-rw-r--r--lib/nettle/mpi.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/lib/nettle/mpi.c b/lib/nettle/mpi.c
index b880e15e27..59e34ebe69 100644
--- a/lib/nettle/mpi.c
+++ b/lib/nettle/mpi.c
@@ -422,9 +422,6 @@ gen_group (mpz_t * prime, mpz_t * generator, unsigned int nbits)
unsigned int q_bytes, w_bytes, r_bytes, w_bits;
int ret;
- mpz_init (*prime);
- mpz_init (*generator);
-
/* security level enforcement.
* Values for q are selected according to ECRYPT II recommendations.
*/
@@ -455,8 +452,6 @@ gen_group (mpz_t * prime, mpz_t * generator, unsigned int nbits)
return GNUTLS_E_MEMORY_ERROR;
}
- mpz_init2 (*prime, nbits);
- mpz_init (*generator);
mpz_init (q);
mpz_init (w);