diff --git a/RouterInfo.cpp b/RouterInfo.cpp index a1c3533f..7bc0161e 100644 --- a/RouterInfo.cpp +++ b/RouterInfo.cpp @@ -36,7 +36,7 @@ namespace data RouterInfo::~RouterInfo () { - delete m_Buffer; + delete[] m_Buffer; } void RouterInfo::Update (const uint8_t * buf, int len) diff --git a/RouterInfo.h b/RouterInfo.h index 4934da32..376dfdc7 100644 --- a/RouterInfo.h +++ b/RouterInfo.h @@ -142,7 +142,7 @@ namespace data void SaveProfile () { if (m_Profile) m_Profile->Save (); }; void Update (const uint8_t * buf, int len); - void DeleteBuffer () { delete m_Buffer; m_Buffer = nullptr; }; + void DeleteBuffer () { delete[] m_Buffer; m_Buffer = nullptr; }; // implements RoutingDestination const IdentHash& GetIdentHash () const { return m_RouterIdentity.GetIdentHash (); };