112783 r=ducarroz sr=bienvenu. free charset got from parsing headers before setting to ISO-8859-1

This commit is contained in:
naving%netscape.com 2001-12-03 23:25:13 +00:00
parent dc8b10ae25
commit 67c66b0acb

View File

@ -1790,8 +1790,10 @@ WriteLineToStream (MimeObject *obj, const char *line, PRBool aDoCharConversion)
charset = FindCharacterSet(obj);
if ( (!charset) || ( (charset) && (!nsCRT::strcasecmp(charset, "us-ascii"))) )
{
PR_Free(charset);
charset = nsCRT::strdup("ISO-8859-1");
}
// convert from the resource charset.
res = INTL_ConvertCharset(charset, "UTF-8", line, nsCRT::strlen(line),
&converted, &converted_length);