mirror of
https://github.com/anope/anope.git
synced 2026-07-10 21:03:13 +02:00
Replaced most uses of smalloc and scalloc with new, replaced most uses of free with delete.
NOTE: This build is unstable due to lack of memory zeroing, this will be addresses in a future commit. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1783 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
@@ -882,6 +882,7 @@ int anope_event_fjoin(const char *source, int ac, const char **av)
|
||||
endnick:
|
||||
strncat(nicklist, prefixandnick, 513);
|
||||
strncat(nicklist, " ", 513);
|
||||
delete [] curnick;
|
||||
curtoken++;
|
||||
curnick = myStrGetToken(av[ac - 1], ' ', curtoken);
|
||||
nlen = 0;
|
||||
@@ -933,7 +934,7 @@ int anope_event_topic(const char *source, int ac, const char **av)
|
||||
return MOD_CONT;
|
||||
|
||||
if (c->topic) {
|
||||
free(c->topic);
|
||||
delete [] c->topic;
|
||||
c->topic = NULL;
|
||||
}
|
||||
if (ac > 1 && *av[1])
|
||||
@@ -1369,7 +1370,7 @@ class ProtoInspIRCd : public Module
|
||||
|
||||
~ProtoInspIRCd()
|
||||
{
|
||||
free(TS6SID);
|
||||
delete [] TS6SID;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user