+void body_wipe(BODY *b)
+{
+ if (b->parameter)
+ parameter_list_wipe(&b->parameter);
+
+ if (b->unlink && b->filename) {
+ unlink (b->filename);
+ }
+
+ p_delete(&b->filename);
+ p_delete(&b->content);
+ p_delete(&b->xtype);
+ p_delete(&b->subtype);
+ p_delete(&b->description);
+ p_delete(&b->form_name);
+
+ if (b->hdr) {
+ /* Don't free twice (b->hdr->content = b->parts) */
+ b->hdr->content = NULL;
+ header_delete(&b->hdr);
+ }
+
+ if (b->parts)
+ body_list_wipe(&b->parts);
+}
+