]> granicus.if.org Git - neomutt/commitdiff
Fix flags if mutt_get_postponed() has no messages
authorKevin McCarthy <kevin@8t8.us>
Thu, 20 Dec 2018 02:48:04 +0000 (18:48 -0800)
committerRichard Russon <rich@flatcap.org>
Mon, 7 Jan 2019 15:09:41 +0000 (15:09 +0000)
Flags needs to be reset so memory cleanup is done at the end.

Co-authored-by: Richard Russon <rich@flatcap.org>
send.c

diff --git a/send.c b/send.c
index 2169830a2faf411688426185be0b8dd58960c51b..56d8d18bad9d0ad8fb88497d6fcc36fa9b0fb276 100644 (file)
--- a/send.c
+++ b/send.c
@@ -1804,7 +1804,10 @@ int ci_send_message(int flags, struct Email *msg, const char *tempfile,
     {
       flags = mutt_get_postponed(ctx, msg, &cur, fcc, sizeof(fcc));
       if (flags < 0)
+      {
+        flags = SEND_POSTPONED;
         goto cleanup;
+      }
 #ifdef USE_NNTP
       /* If postponed message is a news article, it have
        * a "Newsgroups:" header line, then set appropriate flag.