diff --git a/intl/uconv/nsTextToSubURI.cpp b/intl/uconv/nsTextToSubURI.cpp index 6afcd1c1ec49..d160b5148370 100644 --- a/intl/uconv/nsTextToSubURI.cpp +++ b/intl/uconv/nsTextToSubURI.cpp @@ -129,6 +129,7 @@ NS_IMETHODIMP nsTextToSubURI::UnEscapeAndConvert( nsDependentCString label(charset); nsAutoCString encoding; if (!EncodingUtils::FindEncodingForLabelNoReplacement(label, encoding)) { + free(unescaped); return NS_ERROR_UCONV_NOCONV; } nsCOMPtr decoder =