mdd->url_name = PL_strdup(urlString);
mdd->url_name = nsCRT::strdup(urlString);
mime_bridge_create_draft_stream(                          nsIMimeEmitter      *newEmitter,                          nsStreamConverter   *newPluginObj2,                          nsIURI              *uri,                          nsMimeOutputType    format_out){  int                     status = 0;  nsMIMESession           *stream = NULL;  struct mime_draft_data  *mdd = NULL;  MimeObject              *obj;  if ( !uri )     return nsnull;  mdd = PR_NEWZAP(struct mime_draft_data);  if (!mdd)     return nsnull;  char *urlString;  if (NS_SUCCEEDED(uri->GetSpec(&urlString)))  {    if ((urlString) && (*urlString))    {      mdd->url_name = PL_strdup(urlString);      if (!(mdd->url_name))      {        PR_FREEIF(mdd);        return nsnull;      }      PR_FREEIF(urlString);    }  }  newPluginObj2->GetForwardInline(&mdd->forwardInline);  mdd->format_out = format_out;  mdd->options = PR_NEWZAP  ( MimeDisplayOptions );  if ( !mdd->options )   {    PR_FREEIF(mdd->url_name);    PR_FREEIF(mdd);    return nsnull;  }  mdd->options->url = mdd->url_name;  mdd->options->format_out = format_out;     // output format  mdd->options->decompose_file_p = PR_TRUE;	/* new field in MimeDisplayOptions */  mdd->options->stream_closure = mdd;  mdd->options->html_closure = mdd;  mdd->options->decompose_headers_info_fn = make_mime_headers_copy;  mdd->options->decompose_file_init_fn = mime_decompose_file_init_fn;  mdd->options->decompose_file_output_fn = mime_decompose_file_output_fn;  mdd->options->decompose_file_close_fn = mime_decompose_file_close_fn;  nsresult rv = nsServiceManager::GetService(kPrefCID, nsIPref::GetIID(), (nsISupports**)&(mdd->options->prefs));  if (! (mdd->options->prefs && NS_SUCCEEDED(rv)))	{    PR_FREEIF(mdd);    return nsnull;  }#ifdef FO_MAIL_MESSAGE_TO  /* If we're attaching a message (for forwarding) then we must eradicate all	 traces of xlateion from it, since forwarding someone else a message	 that wasn't xlated for them doesn't work.  We have to dexlate it	 before sending it.   */// RICHIE  mdd->options->dexlate_p = PR_TRUE;#endif /* FO_MAIL_MESSAGE_TO */  obj = mime_new ( (MimeObjectClass *) &mimeMessageClass, (MimeHeaders *) NULL, MESSAGE_RFC822 );  if ( !obj )   {    PR_FREEIF(mdd->url_name);    PR_FREEIF(mdd->options->part_to_load);    PR_FREEIF(mdd->options);    PR_FREEIF(mdd );    return nsnull;  }    obj->options = mdd->options;  mdd->obj = obj;  stream = PR_NEWZAP ( nsMIMESession );  if ( !stream )   {    PR_FREEIF(mdd->url_name);    PR_FREEIF( mdd->options->part_to_load );    PR_FREEIF ( mdd->options );    PR_FREEIF ( mdd );    PR_FREEIF ( obj );    return nsnull;  }  stream->name = "MIME To Draft Converter Stream";  stream->complete = mime_parse_stream_complete;  stream->abort = mime_parse_stream_abort;  stream->put_block = mime_parse_stream_write;  stream->data_object = mdd;  status = obj->clazz->initialize ( obj );  if ( status >= 0 )    status = obj->clazz->parse_begin ( obj );  if ( status < 0 )   {    PR_FREEIF(mdd->url_name);    PR_FREEIF ( stream );    PR_FREEIF( mdd->options->part_to_load );    PR_FREEIF ( mdd->options );    PR_FREEIF ( mdd );    PR_FREEIF ( obj );    return nsnull;  }  return stream;}