X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=postpone.c;h=fd06b628b32179e53132f496c4ace0d4d5b96796;hp=cb512718e70ec1164edf567a0791a4d0586ed2f4;hb=b62cf5fb77a75e17b176141d232655e5bd8b7fe1;hpb=69f4685e616347559d4ec714fd826d7f97a472ef diff --git a/postpone.c b/postpone.c index cb51271..fd06b62 100644 --- a/postpone.c +++ b/postpone.c @@ -8,36 +8,24 @@ * please see the file GPL in the top level source directory. */ -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include +#include #include #include #include +#include +#include + +#include #include "mutt.h" #include "handler.h" #include "sort.h" #include "thread.h" -#include "mx.h" #include #include -#include static struct mapping_t PostponeHelp[] = { {N_("Exit"), OP_EXIT}, @@ -537,13 +525,13 @@ int mutt_prepare_template (FILE * fp, CONTEXT * ctx, HEADER * newhdr, err: mx_close_message (&msg); envelope_delete(&newhdr->env); - mutt_free_body (&newhdr->content); + body_list_wipe(&newhdr->content); mutt_error _("Decryption failed."); return -1; } - mutt_free_body (&newhdr->content); + body_list_wipe(&newhdr->content); newhdr->content = b; mutt_clear_error (); @@ -563,7 +551,7 @@ int mutt_prepare_template (FILE * fp, CONTEXT * ctx, HEADER * newhdr, newhdr->security |= APPLICATION_SMIME; /* destroy the signature */ - mutt_free_body (&newhdr->content->parts->next); + body_list_wipe(&newhdr->content->parts->next); newhdr->content = mutt_remove_multipart (newhdr->content); } @@ -634,7 +622,7 @@ int mutt_prepare_template (FILE * fp, CONTEXT * ctx, HEADER * newhdr, else mutt_decode_attachment (b, &s); - if (safe_fclose (&s.fpout) != 0) + if (m_fclose(&s.fpout) != 0) goto bail; m_strreplace(&b->filename, file); @@ -642,7 +630,7 @@ int mutt_prepare_template (FILE * fp, CONTEXT * ctx, HEADER * newhdr, mutt_stamp_attachment (b); - mutt_free_body (&b->parts); + body_list_wipe(&b->parts); if (b->hdr) b->hdr->content = NULL; /* avoid dangling pointer */ } @@ -674,7 +662,7 @@ bail: if (rv == -1) { envelope_delete(&newhdr->env); - mutt_free_body (&newhdr->content); + body_list_wipe(&newhdr->content); } return rv;