Fix #650: CKey::SetSecret BIGNUM leak
@ -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");
}
fSet = true;
if (fCompressed || fCompressedPubKey)