-void mutt_free_envelope (ENVELOPE ** p)
-{
- if (!*p)
- return;
- rfc822_free_address (&(*p)->return_path);
- rfc822_free_address (&(*p)->from);
- rfc822_free_address (&(*p)->to);
- rfc822_free_address (&(*p)->cc);
- rfc822_free_address (&(*p)->bcc);
- rfc822_free_address (&(*p)->sender);
- rfc822_free_address (&(*p)->reply_to);
- rfc822_free_address (&(*p)->mail_followup_to);
-
- mem_free (&(*p)->list_post);
- mem_free (&(*p)->subject);
- /* real_subj is just an offset to subject and shouldn't be freed */
- mem_free (&(*p)->message_id);
- mem_free (&(*p)->supersedes);
- mem_free (&(*p)->date);
- mem_free (&(*p)->x_label);
- mem_free (&(*p)->organization);
-#ifdef USE_NNTP
- mem_free (&(*p)->newsgroups);
- mem_free (&(*p)->xref);
- mem_free (&(*p)->followup_to);
- mem_free (&(*p)->x_comment_to);
-#endif
-
- mutt_buffer_free (&(*p)->spam);
- mutt_free_list (&(*p)->references);
- mutt_free_list (&(*p)->in_reply_to);
- mutt_free_list (&(*p)->userhdrs);
- mem_free (p);
-}
-