summaryrefslogtreecommitdiff
path: root/include
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 /include
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 'include')
-rw-r--r--include/extern.h2
-rw-r--r--include/services.h6
2 files changed, 3 insertions, 5 deletions
diff --git a/include/extern.h b/include/extern.h
index 8bc6c25a7..8c050d857 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -1016,8 +1016,6 @@ E int b64_decode(const char *src, char *target, size_t targsize);
E const char* encode_ip(unsigned char *ip);
E int decode_ip(const char *buf);
-#define Anope_Free(x) if ((x) != NULL) free(x)
-
E char *host_resolve(char *host);
E void event_process_hook(const char *name, int argc, char **argv);
diff --git a/include/services.h b/include/services.h
index f8e8334bf..0d2b98436 100644
--- a/include/services.h
+++ b/include/services.h
@@ -1282,7 +1282,7 @@ private:
{
char *s = normalizeBuffer(buf);
send_cmd(ircd->ts6 ? bi->uid : bi->nick, "NOTICE %s :\1%s\1", dest, s);
- free(s);
+ delete [] s;
}
virtual void SendNumericInternal(const char *source, int numeric, const char *dest, const char *buf)
{
@@ -1506,8 +1506,8 @@ struct Uplink {
}
~Uplink()
{
- free(host);
- free(password);
+ delete [] host;
+ delete [] password;
}
};