diff options
author | Martin Willi <martin@strongswan.org> | 2007-09-12 07:11:41 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2007-09-12 07:11:41 +0000 |
commit | f25156dfc394f74566c2a3db3b2e80ec5ac15c1c (patch) | |
tree | 992496674f29a7b2d1ec3ac1d433cadafea2ca53 /src | |
parent | 8b373ee6fc0485c596206c427890aae4681b26c1 (diff) | |
download | strongswan-f25156dfc394f74566c2a3db3b2e80ec5ac15c1c.tar.bz2 strongswan-f25156dfc394f74566c2a3db3b2e80ec5ac15c1c.tar.xz |
fixed warnings and memory leak
Diffstat (limited to 'src')
-rw-r--r-- | src/libstrongswan/crypto/rsa/rsa_private_key.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstrongswan/crypto/rsa/rsa_private_key.c b/src/libstrongswan/crypto/rsa/rsa_private_key.c index a50acaece..67df553a5 100644 --- a/src/libstrongswan/crypto/rsa/rsa_private_key.c +++ b/src/libstrongswan/crypto/rsa/rsa_private_key.c @@ -176,7 +176,7 @@ static private_rsa_private_key_t *rsa_private_key_create_empty(void); * Auxiliary function overwriting private key material with * pseudo-random bytes before releasing it */ -static mpz_clear_randomized(mpz_t z) +static void mpz_clear_randomized(mpz_t z) { size_t len = mpz_size(z) * GMP_LIMB_BITS / BITS_PER_BYTE; u_int8_t *random_bytes = alloca(len); @@ -330,6 +330,7 @@ static status_t build_emsa_pkcs1_signature(private_rsa_private_key_t *this, hash_id, asn1_simple_object(ASN1_OCTET_STRING, hash) ); + chunk_free(&hash); /* build chunk to rsa-decrypt: * EM = 0x00 || 0x01 || PS || 0x00 || T. |