1
0
mirror of https://github.com/anope/anope.git synced 2026-06-26 21:16:39 +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:
cyberbotx
2008-11-22 01:11:19 +00:00
parent 1532aa675f
commit 16e667a2ce
79 changed files with 786 additions and 835 deletions
+3 -3
View File
@@ -45,7 +45,7 @@ Module::Module(const std::string &mname, const std::string &creator)
lastHash = current;
}
if ((newHash = (ModuleHash *)malloc(sizeof(ModuleHash))) == NULL) {
if (!(newHash = new ModuleHash)) {
fatal("Out of memory");
}
this->created = time(NULL);
@@ -164,8 +164,8 @@ Module::~Module()
} else {
lastHash->next = mhash->next;
}
free(mhash->name);
free(mhash);
delete [] mhash->name;
delete mhash;
}
lastHash = mhash;
}