diff options
author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-22 01:11:19 +0000 |
---|---|---|
committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-22 01:11:19 +0000 |
commit | 16e667a2cecf9492954333fc7949b6636072f941 (patch) | |
tree | 746164afdc56c0a30dea0f1736c4129c1f1ad422 /src/protocol/ratbox.c | |
parent | 1532aa675f7c28b8ff0061ebc21f374d36d89d65 (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/protocol/ratbox.c')
-rw-r--r-- | src/protocol/ratbox.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/protocol/ratbox.c b/src/protocol/ratbox.c index 245ae5f91..a91d676a6 100644 --- a/src/protocol/ratbox.c +++ b/src/protocol/ratbox.c @@ -763,7 +763,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]) @@ -808,18 +808,18 @@ int anope_event_tburst(const char *source, int ac, const char **av) merge_args(ac - 1, av + 1), av[0]); } if (setter) - free(setter); + delete [] setter; return MOD_CONT; } if (check_topiclock(c, topic_time)) { if (setter) - free(setter); + delete [] setter; return MOD_CONT; } if (c->topic) { - free(c->topic); + delete [] c->topic; c->topic = NULL; } if (ac > 1 && *av[3]) @@ -830,7 +830,7 @@ int anope_event_tburst(const char *source, int ac, const char **av) record_topic(av[0]); if (setter) - free(setter); + delete [] setter; return MOD_CONT; } @@ -1044,7 +1044,7 @@ int anope_event_capab(const char *source, int ac, const char **av) /* Free our built ac/av */ for (argvsize = 0; argvsize < argc; argvsize++) { - free((char *)argv[argvsize]); + delete [] argv[argvsize]; } free((char **)argv); @@ -1083,9 +1083,9 @@ int anope_event_bmask(const char *source, int ac, const char **av) add_invite(c, b); } if (b) - free(b); + delete [] b; } - free(bans); + delete [] bans; } return MOD_CONT; } @@ -1172,7 +1172,7 @@ class ProtoRatbox : public Module ~ProtoRatbox() { - free(TS6SID); + delete [] TS6SID; } }; |