diff --git a/modules/commands/cs_entrymsg.cpp b/modules/commands/cs_entrymsg.cpp index 46089cd94..68c36e7c7 100644 --- a/modules/commands/cs_entrymsg.cpp +++ b/modules/commands/cs_entrymsg.cpp @@ -44,6 +44,12 @@ static unsigned MaxEntries = 0; struct EntryMessageList : Serialize::Checker >, ExtensibleItem { EntryMessageList() : Serialize::Checker >("EntryMsg") { } + + ~EntryMessageList() + { + for (unsigned i = 0; i < (*this)->size(); ++i) + delete (*this)->at(i); + } }; Serializable* EntryMsg::Unserialize(Serializable *obj, Serialize::Data &data) diff --git a/modules/commands/ns_ajoin.cpp b/modules/commands/ns_ajoin.cpp index 605fd12c1..3f4d9d3ec 100644 --- a/modules/commands/ns_ajoin.cpp +++ b/modules/commands/ns_ajoin.cpp @@ -18,6 +18,7 @@ struct AJoinEntry; struct AJoinList : Serialize::Checker >, ExtensibleItem { AJoinList() : Serialize::Checker >("AJoinEntry") { } + ~AJoinList(); }; struct AJoinEntry : Serializable @@ -75,6 +76,12 @@ struct AJoinEntry : Serializable } }; +AJoinList::~AJoinList() +{ + for (unsigned i = 0; i < (*this)->size(); ++i) + delete (*this)->at(i); +} + class CommandNSAJoin : public Command { void DoList(CommandSource &source, NickCore *nc)