diff --git a/intl/uconv/src/nsWinCharset.cpp b/intl/uconv/src/nsWinCharset.cpp index 411ae0463f38..6b3c5ddcece1 100644 --- a/intl/uconv/src/nsWinCharset.cpp +++ b/intl/uconv/src/nsWinCharset.cpp @@ -107,7 +107,7 @@ nsWinCharset::GetDefaultCharsetForLocale(const PRUnichar* localeName, PRUnichar* // // load property file and convert from LCID->charset // - + // XXX - this should be cached for the lifetime of the component, nicht wahr? nsAutoString property_url("resource:/res/wincharset.properties"); nsURLProperties *charset_properties = new nsURLProperties(property_url); if (!charset_properties) { *_retValue = charset.ToNewUnicode(); return NS_ERROR_OUT_OF_MEMORY; } @@ -116,6 +116,7 @@ nsWinCharset::GetDefaultCharsetForLocale(const PRUnichar* localeName, PRUnichar* acp_key.Append(acp_name); result = charset_properties->Get(acp_key,charset); + delete [] charset_properties; *_retValue = charset.ToNewUnicode(); return result; }