-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);
-
- p_delete(&(*p)->list_post);
- p_delete(&(*p)->subject);
- /* real_subj is just an offset to subject and shouldn't be freed */
- p_delete(&(*p)->message_id);
- p_delete(&(*p)->supersedes);
- p_delete(&(*p)->date);
- p_delete(&(*p)->x_label);
- p_delete(&(*p)->organization);
-#ifdef USE_NNTP
- p_delete(&(*p)->newsgroups);
- p_delete(&(*p)->xref);
- p_delete(&(*p)->followup_to);
- p_delete(&(*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);
- p_delete(p);
-}
-