mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-22 00:59:08 +01:00
fixed memory leak
This commit is contained in:
parent
55dbbb3546
commit
006e4526e8
1 changed files with 4 additions and 3 deletions
|
@ -155,9 +155,10 @@ namespace crypto
|
||||||
ECDSAVerifier (const uint8_t * signingKey)
|
ECDSAVerifier (const uint8_t * signingKey)
|
||||||
{
|
{
|
||||||
m_PublicKey = EC_KEY_new_by_curve_name (curve);
|
m_PublicKey = EC_KEY_new_by_curve_name (curve);
|
||||||
EC_KEY_set_public_key_affine_coordinates (m_PublicKey,
|
BIGNUM * x = BN_bin2bn (signingKey, keyLen/2, NULL);
|
||||||
BN_bin2bn (signingKey, keyLen/2, NULL),
|
BIGNUM * y = BN_bin2bn (signingKey + keyLen/2, keyLen/2, NULL);
|
||||||
BN_bin2bn (signingKey + keyLen/2, keyLen/2, NULL));
|
EC_KEY_set_public_key_affine_coordinates (m_PublicKey, x, y);
|
||||||
|
BN_free (x); BN_free (y);
|
||||||
}
|
}
|
||||||
|
|
||||||
~ECDSAVerifier ()
|
~ECDSAVerifier ()
|
||||||
|
|
Loading…
Add table
Reference in a new issue