X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/38615191e71744b066425e0c44412b62dbe49cc2..a75b45f604c4e48b0f39be25ce59cd1955e5f9a4:/uip/mhfree.c?ds=inline diff --git a/uip/mhfree.c b/uip/mhfree.c index df0ee465..5fa2a59c 100644 --- a/uip/mhfree.c +++ b/uip/mhfree.c @@ -3,15 +3,12 @@ * mhfree.c -- routines to free the data structures used to * -- represent MIME messages * - * $Id$ - * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for * complete copyright information. */ #include -#include #include #include @@ -21,7 +18,6 @@ CT *cts = NULL; /* * prototypes */ -void free_content (CT); void free_header (CT); void free_ctinfo (CT); void free_encoding (CT, int); @@ -207,6 +203,8 @@ free_multi (CT ct) free (m->mp_start); if (m->mp_stop) free (m->mp_stop); + free (m->mp_content_before); + free (m->mp_content_after); for (part = m->mp_parts; part; part = next) { next = part->mp_next; @@ -247,6 +245,8 @@ free_external (CT ct) free_content (e->eb_content); if (e->eb_body) free (e->eb_body); + if (e->eb_url) + free (e->eb_url); free ((char *) e); ct->c_ctparams = NULL; @@ -261,10 +261,7 @@ free_external (CT ct) void free_encoding (CT ct, int toplevel) { - CE ce; - - if (!(ce = ct->c_cefile)) - return; + CE ce = &ct->c_cefile; if (ce->ce_fp) { fclose (ce->ce_fp); @@ -278,10 +275,7 @@ free_encoding (CT ct, int toplevel) ce->ce_file = NULL; } - if (toplevel) { - free ((char *) ce); - ct->c_cefile = NULL; - } else { + if (! toplevel) { ct->c_ceopenfnx = NULL; } }