]> granicus.if.org Git - mutt/commitdiff
Fixing a memory leak in mutt_prepare_envelope().
authorThomas Roessler <roessler@does-not-exist.org>
Fri, 4 Sep 1998 14:43:06 +0000 (14:43 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Fri, 4 Sep 1998 14:43:06 +0000 (14:43 +0000)
sendlib.c

index 4bf9a5c14bc19e066625e027fc981b8bab707134..ac6e2f0fbf96b573c2f3e405720ccd3a3b3e6c6b 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -1671,12 +1671,13 @@ void mutt_prepare_envelope (ENVELOPE *env)
      * it by using an empty To: field.
      */
     env->to = rfc822_new_address ();
-    env->to->mailbox = safe_strdup ("undisclosed-recipients:;");
     env->to->group = 1;
     env->to->next = rfc822_new_address ();
+
     buffer[0] = 0;
-    rfc822_cat (buffer, sizeof (buffer), env->to->mailbox, RFC822Specials);
+    rfc822_cat (buffer, sizeof (buffer), "undisclosed-recipients:;",
+               RFC822Specials);
+
     env->to->mailbox = safe_strdup (buffer);
   }