mirror of
https://github.com/anope/anope.git
synced 2026-07-08 04:03:12 +02:00
Memory: Properly initialize and free new module languages.
Memory: Properly free strings in module config directive lookups. Memory: Do not leak module version and author in rare situations. Memory: Memory leak when deleting a module callback. Memory: Memory leaks with module messages. Memory: Memory leaks with module commands. Memory: Memory leaks with module event handlers. Memory: Memory leaks with module event hooks. Memory: Every module config entry of type string is leaked on config reload. Memory: Leak services root list, ulines list, host setters list, modules autoload list, modules delayed autoload list, hostserv/memoserv/helpserv/botserv/operserv/chanserv/nickserv core modules lists on config reload. Memory: Leaks with channel bans/invites/exceptions. Memory: Leak when updating already existing ignore. Memory: Invalid pointer read in slists. Memory: Leak when using /cs appendtopic. Memory: Leak on (currently impossible) config reload. Memory: Syscall param write(buf) points to uninitialised byte(s) in save_ns_dbase(). Memory: Leak if PreNickServDB is set and NSEmailReg is not. Removing a command no longer calls free() on help_param*, reversed previous changes Changes to CSMaxReg, MSMaxMemos and NewsCount are now properly reflected in help notices after config reload Small adjustments Fixed copy&paste mistake Fix findCommand() searching in the wrong command tables
This commit is contained in:
@@ -1741,6 +1741,7 @@ void chan_delete(Channel * c)
|
||||
while (c->bans->entries) {
|
||||
entry_delete(c->bans, c->bans->entries);
|
||||
}
|
||||
free(c->bans);
|
||||
}
|
||||
|
||||
if (ircd->except) {
|
||||
@@ -1748,6 +1749,7 @@ void chan_delete(Channel * c)
|
||||
while (c->excepts->entries) {
|
||||
entry_delete(c->excepts, c->excepts->entries);
|
||||
}
|
||||
free(c->excepts);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1756,6 +1758,7 @@ void chan_delete(Channel * c)
|
||||
while (c->invites->entries) {
|
||||
entry_delete(c->invites, c->invites->entries);
|
||||
}
|
||||
free(c->invites);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1784,6 +1787,10 @@ void del_ban(Channel * chan, char *mask)
|
||||
|
||||
if (ban) {
|
||||
entry_delete(chan->bans, ban);
|
||||
if (chan->bans->count == 0) {
|
||||
free(chan->bans);
|
||||
chan->bans = NULL;
|
||||
}
|
||||
|
||||
if (debug)
|
||||
alog("debug: Deleted ban %s from channel %s", mask,
|
||||
@@ -1808,6 +1815,10 @@ void del_exception(Channel * chan, char *mask)
|
||||
|
||||
if (exception) {
|
||||
entry_delete(chan->excepts, exception);
|
||||
if (chan->excepts->count == 0) {
|
||||
free(chan->excepts);
|
||||
chan->excepts = NULL;
|
||||
}
|
||||
|
||||
if (debug)
|
||||
alog("debug: Deleted except %s to channel %s", mask,
|
||||
@@ -1830,6 +1841,10 @@ void del_invite(Channel * chan, char *mask)
|
||||
|
||||
if (invite) {
|
||||
entry_delete(chan->invites, invite);
|
||||
if(chan->invites->count == 0) {
|
||||
free(chan->invites);
|
||||
chan->invites = NULL;
|
||||
}
|
||||
|
||||
if (debug)
|
||||
alog("debug: Deleted invite %s to channel %s", mask,
|
||||
|
||||
Reference in New Issue
Block a user