cases a content structure is reused and you can get into problems with
double-free()ing elements depending on your MIME composition content syntax.
static void free_multi (CT);
static void free_partial (CT);
static void free_external (CT);
static void free_multi (CT);
static void free_partial (CT);
static void free_external (CT);
-static void free_pmlist (PM);
+static void free_pmlist (PM *);
+ ct->c_partno = NULL;
+ }
+ ct->c_ctline = NULL;
+ }
+ ct->c_showproc = NULL;
+ }
+ if (ct->c_termproc) {
+ ct->c_termproc = NULL;
+ }
+ if (ct->c_storeproc) {
+ ct->c_storeproc = NULL;
+ }
+ ct->c_celine = NULL;
+ }
/* free structures for content encodings */
free_encoding (ct, 1);
/* free structures for content encodings */
free_encoding (ct, 1);
+ ct->c_id = NULL;
+ }
+ if (ct->c_descr) {
+ ct->c_descr = NULL;
+ }
+ if (ct->c_dispo) {
+ ct->c_dispo = NULL;
+ }
+ if (ct->c_dispo_type) {
- free_pmlist (ct->c_dispo_first);
+ ct->c_dispo_type = NULL;
+ }
+ free_pmlist (&ct->c_dispo_first);
if (ct->c_file) {
if (ct->c_unlink)
(void) m_unlink (ct->c_file);
free (ct->c_file);
if (ct->c_file) {
if (ct->c_unlink)
(void) m_unlink (ct->c_file);
free (ct->c_file);
+ ct->c_storage = NULL;
+ }
+ if (ct->c_folder) {
+ ct->c_folder = NULL;
+ }
free (ci->ci_subtype);
ci->ci_subtype = NULL;
}
free (ci->ci_subtype);
ci->ci_subtype = NULL;
}
- free_pmlist(ci->ci_first_pm);
+ free_pmlist(&ci->ci_first_pm);
if (ci->ci_comment) {
free (ci->ci_comment);
ci->ci_comment = NULL;
if (ci->ci_comment) {
free (ci->ci_comment);
ci->ci_comment = NULL;
while (pm != NULL) {
if (pm->pm_name)
while (pm != NULL) {
if (pm->pm_name)