static int MimeMultipartSigned_close_child (MimeObject *obj) { /* The close_child method on MimeMultipartSigned doesn't actually do anything to the children list, since the create_child method also doesn't do anything. */ MimeMultipart *mult = (MimeMultipart *) obj; MimeContainer *cont = (MimeContainer *) obj; MimeMultipartSigned *msig = (MimeMultipartSigned *) obj; if (msig->part_buffer) /* Closes the tmp file, if there is one: doesn't free the part_buffer. */ MimePartBufferClose(msig->part_buffer); if (mult->hdrs) /* duplicated from MimeMultipart_close_child, ugh. */ { MimeHeaders_free(mult->hdrs); mult->hdrs = 0; } /* Should be no kids yet. */ PR_ASSERT(cont->nchildren == 0); if (cont->nchildren != 0) return -1; return 0; }
static int MimeMultipartAlternative_close_child(MimeObject *obj) { MimeMultipartAlternative *malt = (MimeMultipartAlternative *) obj; MimeMultipart *mult = (MimeMultipart *) obj; /* PR_ASSERT(malt->part_buffer); Some Mac brokenness trips this... if (!malt->part_buffer) return -1; */ if (malt->pending_parts) MimePartBufferClose(malt->part_buffers[malt->pending_parts-1]); /* PR_ASSERT(mult->hdrs); I expect the Mac trips this too */ if (mult->hdrs) { MimeHeaders_free(mult->hdrs); mult->hdrs = 0; } return 0; }