mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-22 00:59:08 +01:00
fix double free
This commit is contained in:
parent
10ffd5c1ab
commit
2f61dd1c41
2 changed files with 5 additions and 3 deletions
|
@ -205,12 +205,12 @@ namespace datagram
|
||||||
if(lease)
|
if(lease)
|
||||||
{
|
{
|
||||||
if(tunnel)
|
if(tunnel)
|
||||||
return DatagramSession::Info{new i2p::data::IdentHash(lease->tunnelGateway), new i2p::data::IdentHash(tunnel->GetEndpointIdentHash()), m_LastUse, m_LastSuccess};
|
return DatagramSession::Info{new i2p::data::IdentHash(lease->tunnelGateway.data()), new i2p::data::IdentHash(tunnel->GetEndpointIdentHash().data()), m_LastUse, m_LastSuccess};
|
||||||
else
|
else
|
||||||
return DatagramSession::Info{new i2p::data::IdentHash(lease->tunnelGateway), nullptr, m_LastUse, m_LastSuccess};
|
return DatagramSession::Info{new i2p::data::IdentHash(lease->tunnelGateway.data()), nullptr, m_LastUse, m_LastSuccess};
|
||||||
}
|
}
|
||||||
else if(tunnel)
|
else if(tunnel)
|
||||||
return DatagramSession::Info{nullptr, new i2p::data::IdentHash(tunnel->GetEndpointIdentHash()), m_LastUse, m_LastSuccess};
|
return DatagramSession::Info{nullptr, new i2p::data::IdentHash(tunnel->GetEndpointIdentHash().data()), m_LastUse, m_LastSuccess};
|
||||||
else
|
else
|
||||||
return DatagramSession::Info{nullptr, nullptr, m_LastUse, m_LastSuccess};
|
return DatagramSession::Info{nullptr, nullptr, m_LastUse, m_LastSuccess};
|
||||||
}
|
}
|
||||||
|
|
2
Tag.h
2
Tag.h
|
@ -50,6 +50,8 @@ namespace data {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const uint8_t * data() const { return m_Buf; }
|
||||||
|
|
||||||
/** fill with a value */
|
/** fill with a value */
|
||||||
void Fill(uint8_t c)
|
void Fill(uint8_t c)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue