From bbe667dc74f3443107d07b6b75037ca765faddcf Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 25 Oct 2012 22:29:10 -0400 Subject: [PATCH] Fixed two memory leaks in cs_seen --- modules/commands/cs_seen.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/commands/cs_seen.cpp b/modules/commands/cs_seen.cpp index 8ae12ba7e..c3d04cf55 100644 --- a/modules/commands/cs_seen.cpp +++ b/modules/commands/cs_seen.cpp @@ -70,7 +70,7 @@ struct SeenInfo : Serializable data["message"] >> s->message; data["last"] >> s->last; - if (!s) + if (!obj) database[s->nick] = s; return s; } @@ -146,6 +146,7 @@ class CommandOSSeen : public Command if (time < buf->second->last) { Log(LOG_DEBUG) << buf->first << " was last seen " << do_strftime(buf->second->last) << ", deleting entry"; + buf->second->destroy(); database.erase(buf); counter++; }