summaryrefslogtreecommitdiff
path: root/src/module.cpp
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-22 01:11:19 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-22 01:11:19 +0000
commit16e667a2cecf9492954333fc7949b6636072f941 (patch)
tree746164afdc56c0a30dea0f1736c4129c1f1ad422 /src/module.cpp
parent1532aa675f7c28b8ff0061ebc21f374d36d89d65 (diff)
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
Diffstat (limited to 'src/module.cpp')
-rw-r--r--src/module.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/module.cpp b/src/module.cpp
index de72c7f64..2df2aaa58 100644
--- a/src/module.cpp
+++ b/src/module.cpp
@@ -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;
}