diff options
author | Adam <Adam@anope.org> | 2012-10-25 22:29:10 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-10-25 22:29:10 -0400 |
commit | bbe667dc74f3443107d07b6b75037ca765faddcf (patch) | |
tree | b831effc41277fce5ad5dca862012faf1c536504 /modules/commands/cs_seen.cpp | |
parent | 3608d42ae98fd916a250144f160b4e6cde61d249 (diff) |
Fixed two memory leaks in cs_seen
Diffstat (limited to 'modules/commands/cs_seen.cpp')
-rw-r--r-- | modules/commands/cs_seen.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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++; } |