]> granicus.if.org Git - mutt/commitdiff
Convert send_msg() $sendmail_wait to use buffer pool.
authorKevin McCarthy <kevin@8t8.us>
Fri, 25 Oct 2019 11:13:50 +0000 (19:13 +0800)
committerKevin McCarthy <kevin@8t8.us>
Fri, 25 Oct 2019 11:13:50 +0000 (19:13 +0800)
sendlib.c

index 5850da3e416fa160cae82172345ff0e0eb0b6a5c..0b1766ce7b9e6a385969122c94c786af06b2f614 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -2268,10 +2268,12 @@ send_msg (const char *path, char **args, const char *msg, char **tempfile)
 
   if (SendmailWait >= 0 && tempfile)
   {
-    char tmp[_POSIX_PATH_MAX];
+    BUFFER *tmp;
 
-    mutt_mktemp (tmp, sizeof (tmp));
-    *tempfile = safe_strdup (tmp);
+    tmp = mutt_buffer_pool_get ();
+    mutt_buffer_mktemp (tmp);
+    *tempfile = safe_strdup (mutt_b2s (tmp));
+    mutt_buffer_pool_release (&tmp);
   }
 
   if ((pid = fork ()) == 0)