summaryrefslogtreecommitdiff
path: root/src/mail.c
diff options
context:
space:
mode:
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;
}
/*************************************************************************/