]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
send_digest: directly dprint instead of allocating a temporary string
authorBaptiste Daroussin <bapt@FreeBSD.org>
Wed, 3 Nov 2021 08:12:14 +0000 (09:12 +0100)
committerBaptiste Daroussin <bapt@FreeBSD.org>
Wed, 3 Nov 2021 13:10:28 +0000 (14:10 +0100)
src/send_digest.c

index 5567d2246c7a5db11cbd873e38d2a253f87ccdf2..8e8d86678786bc7d7bfa6d38fe3bc86b1b7f573b 100644 (file)
@@ -470,8 +470,7 @@ errdighdrs:
                close(archivefd);
        }
 
-       tmp = concatstr(3, "\n--", boundary, "--\n");
-       if (dprintf(fd, "%s", tmp) == -1) {
+       if (dprintf(fd, "\n--%s--\n", boundary) == -1) {
                log_error(LOG_ARGS, "Could not write digest end to '%s'",
                                queuename);
                close(fd);
@@ -483,7 +482,6 @@ errdighdrs:
 
        close(fd);
        myfree(boundary);
-       myfree(tmp);
 
        childpid = fork();