Fix #650: CKey::SetSecret BIGNUM leak
This commit is contained in:
parent
e0b8d459b1
commit
a09f101f14
|
@ -144,7 +144,10 @@ public:
|
|||
if (bn == NULL)
|
||||
throw key_error("CKey::SetSecret() : BN_bin2bn failed");
|
||||
if (!EC_KEY_regenerate_key(pkey,bn))
|
||||
{
|
||||
BN_clear_free(bn);
|
||||
throw key_error("CKey::SetSecret() : EC_KEY_regenerate_key failed");
|
||||
}
|
||||
BN_clear_free(bn);
|
||||
fSet = true;
|
||||
if (fCompressed || fCompressedPubKey)
|
||||
|
|
Loading…
Reference in New Issue