X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=mail.c;h=b55fc56dc456fcee04420e58297acf0e8a8b93fd;hp=d4c6441e76815f32fda6414ba840363121fa3047;hb=701b046a45c2c79cc6d07ac3a4f84f499f7ed376;hpb=2ed0fee489c37a6e2d4473f6185ebbe3e746ac11 diff --git a/mail.c b/mail.c index d4c6441..b55fc56 100644 --- a/mail.c +++ b/mail.c @@ -179,8 +179,7 @@ static void *mail_child(void *arg) PDEBUG(DEBUG_EPOINT, "child process done for sending a mail\n"); /* exit process */ - memset(args, 0, sizeof(struct mail_args)); - free(args); + FREE(args, sizeof(struct mail_args)); amemuse--; return(NULL); } @@ -190,12 +189,7 @@ void send_mail(char *filename, char *callerid, char *callerintern, char *callern struct mail_args *arg; pthread_t tid; - arg = (struct mail_args *)calloc(1, sizeof(struct mail_args)); - if (!arg) - { - PERROR("failed to alloc memory.\n"); - return; - } + arg = (struct mail_args *)MALLOC(sizeof(struct mail_args)); amemuse++; SCPY(arg->email, vbox_email);