*data = (nsMsgAttachmentData *)PR_Malloc( (n + 1) * sizeof(MSG_AttachmentData));
*data = (nsMsgAttachmentData *)PR_Malloc( (n + 1) * sizeof(nsMsgAttachmentData));
MimeGetAttachmentList(MimeObject *tobj, const char *aMessageURL, nsMsgAttachmentData **data){  MimeObject            *obj;  MimeContainer         *cobj;  PRInt32               n;  PRBool                isAlternativeOrRelated = PR_FALSE;  if (!data)     return 0;  *data = NULL;  obj = mime_get_main_object(tobj);  if ( (obj) && (!mime_subclass_p(obj->clazz, (MimeObjectClass*) &mimeContainerClass)) )  {    if (!PL_strcasecmp(obj->content_type, MESSAGE_RFC822))      return 0;    else      return ProcessBodyAsAttachment(obj, data);  }  (void) MimeObjectChildIsMessageBody(obj, &isAlternativeOrRelated);  if (isAlternativeOrRelated)    return 0;    cobj = (MimeContainer*) obj;  n = CountTotalMimeAttachments(cobj);  if (n <= 0)     return n;  *data = (nsMsgAttachmentData *)PR_Malloc( (n + 1) * sizeof(MSG_AttachmentData));  if (!*data)     return NS_ERROR_OUT_OF_MEMORY;  attIndex = 0;  nsCRT::memset(*data, 0, (n + 1) * sizeof(MSG_AttachmentData));    // Now, build the list!  return BuildAttachmentList((MimeObject *) cobj, *data, aMessageURL);}