some cleanup

This commit is contained in:
orignal 2018-09-09 08:38:12 -04:00
parent a8b1a86bd7
commit 3540712517
4 changed files with 7 additions and 6 deletions

View file

@ -626,7 +626,11 @@ namespace i2p
if (!m_StaticKeys)
{
if (!m_NTCP2Keys) NewNTCP2Keys ();
m_StaticKeys.reset (new i2p::crypto::X25519Keys (m_NTCP2Keys->staticPrivateKey, m_NTCP2Keys->staticPublicKey));
auto x = new i2p::crypto::X25519Keys (m_NTCP2Keys->staticPrivateKey, m_NTCP2Keys->staticPublicKey);
if (!m_StaticKeys)
m_StaticKeys.reset (x);
else
delete x;
}
return *m_StaticKeys;
}