From 739ca8f51f036a41147d4dcf9a3a154c6b29b720 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 22 May 2017 23:00:10 +0200 Subject: [PATCH] Bug 1366882 - Fix a resource leak - CID 1213977 - r=froydnj MozReview-Commit-ID: 7Af5BXxaIZl --HG-- extra : rebase_source : 121c3d2b88d1e44d7a35058c8fe689f602cf6425 --- intl/uconv/nsTextToSubURI.cpp | 1 + 1 file changed, 1 insertion(+) 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 =