mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-10 11:28:27 +01:00
fixed memory leak
This commit is contained in:
parent
9b7f583b2b
commit
8ffddf06e4
1 changed files with 3 additions and 1 deletions
|
@ -298,11 +298,13 @@ namespace crypto
|
||||||
BN_rand (k, ELGAMAL_SHORT_EXPONENT_NUM_BITS, -1, 1); // short exponent of 226 bits
|
BN_rand (k, ELGAMAL_SHORT_EXPONENT_NUM_BITS, -1, 1); // short exponent of 226 bits
|
||||||
#endif
|
#endif
|
||||||
// calculate a
|
// calculate a
|
||||||
a = BN_new ();
|
|
||||||
if (g_ElggTable)
|
if (g_ElggTable)
|
||||||
a = ElggPow (k, g_ElggTable, ctx);
|
a = ElggPow (k, g_ElggTable, ctx);
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
a = BN_new ();
|
||||||
BN_mod_exp (a, elgg, k, elgp, ctx);
|
BN_mod_exp (a, elgg, k, elgp, ctx);
|
||||||
|
}
|
||||||
|
|
||||||
BIGNUM * y = BN_new ();
|
BIGNUM * y = BN_new ();
|
||||||
BN_bin2bn (key, 256, y);
|
BN_bin2bn (key, 256, y);
|
||||||
|
|
Loading…
Add table
Reference in a new issue