mirror of
https://github.com/anope/anope.git
synced 2026-06-30 00:36:37 +02:00
Fixed two memory leaks in cs_seen
This commit is contained in:
@@ -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++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user