Missing free in error case.

This commit is contained in:
JoelKatz
2013-04-09 17:00:46 -07:00
parent 21ead9e866
commit bd3780abbc

View File

@@ -294,8 +294,9 @@ EC_KEY* CKey::GeneratePrivateDeterministicKey(const RippleAddress& pubGen, const
if(EC_POINT_mul(EC_KEY_get0_group(pkey), pubKey, privKey, NULL, NULL, ctx)==0)
{
BN_clear_free(privKey);
BN_CTX_free(ctx);
EC_POINT_free(pubKey);
EC_KEY_free(pkey);
BN_CTX_free(ctx);
return NULL;
}
BN_clear_free(privKey);