summaryrefslogtreecommitdiff
path: root/src/mail.c
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/mail.c
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/mail.c')
-rw-r--r--src/mail.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mail.c b/src/mail.c
index 4aa3b0a2a..005ac97ab 100644
--- a/src/mail.c
+++ b/src/mail.c
@@ -45,13 +45,13 @@ MailInfo *MailRegBegin(User * u, NickRequest * nr, char *subject,
} else {
MailInfo *mail;
- mail = (MailInfo *)scalloc(sizeof(MailInfo), 1);
+ mail = new MailInfo;
mail->sender = u;
mail->recipient = NULL;
mail->recip = nr;
if (!(mail->pipe = popen(SendMailPath, "w"))) {
- free(mail);
+ delete mail;
notice_lang(service, u, MAIL_LATER);
return NULL;
}
@@ -98,13 +98,13 @@ MailInfo *MailBegin(User * u, NickCore * nc, char *subject, char *service)
} else {
MailInfo *mail;
- mail = (MailInfo *)scalloc(sizeof(MailInfo), 1);
+ mail = new MailInfo;
mail->sender = u;
mail->recipient = nc;
mail->recip = NULL;
if (!(mail->pipe = popen(SendMailPath, "w"))) {
- free(mail);
+ delete mail;
notice_lang(service, u, MAIL_LATER);
return NULL;
}
@@ -143,13 +143,13 @@ MailInfo *MailMemoBegin(NickCore * nc)
} else {
MailInfo *mail;
- mail = (MailInfo *)scalloc(sizeof(MailInfo), 1);
+ mail = new MailInfo;
mail->sender = NULL;
mail->recipient = nc;
mail->recip = NULL;
if (!(mail->pipe = popen(SendMailPath, "w"))) {
- free(mail);
+ delete mail;
return NULL;
}
@@ -199,7 +199,7 @@ void MailEnd(MailInfo * mail)
mail->recip->lastmail = time(NULL);
- free(mail);
+ delete mail;
}
/*************************************************************************/