if ((txt != NULL) && !statctrl(list, "nodigesttext")) {
- tmp = concatstr(3, "\n--", boundary,
- "\nContent-Type: text/plain; charset=UTF-8"
- "\nContent-Transfer-Encoding: 8bit"
- "\n\n");
- if (dprintf(fd, "%s", tmp) == -1) {
+ if (dprintf(fd, "\n--%s"
+ "\nContent-Type: text/plain; charset=UTF-8"
+ "\nContent-Transfer-Encoding: 8bit"
+ "\n\n", boundary) == -1) {
log_error(LOG_ARGS, "Could not write digest text/plain"
" part headers to '%s'", queuename);
close(fd);
unlink(queuename);
myfree(boundary);
- myfree(tmp);
myfree(queuename);
if (txt != NULL) {
close_text(txt);
}
return -1;
}
- myfree(tmp);
for (;;) {
line = get_processed_text_line(txt, 0, list);
if (archivefd < 0)
continue;
- tmp = concatstr(7, "\n--", boundary,
- "\nContent-Type: message/rfc822"
- "\nContent-Disposition: inline; filename=\"",
- list->name, "_", buf, ".eml\""
- "\n\n");
- if (dprintf(fd, "%s", tmp) == -1) {
+ if (dprintf(fd, "\n--%s"
+ "\nContent-Type: message/rfc822"
+ "\nContent-Disposition: inline; filename=\"%s_%s.eml\"",
+ boundary, list->name, buf) == -1) {
log_error(LOG_ARGS, "Could not write digest part "
"headers for archive index %d to "
"'%s'", i, queuename);
close(archivefd);
unlink(queuename);
myfree(boundary);
- myfree(tmp);
myfree(queuename);
return -1;
}
- myfree(tmp);
if (dumpfd2fd(archivefd, fd) < 0) {
log_error(LOG_ARGS, "Could not write digest part %d "