From 7e4e63b04f87c690b017c43ebbb3218eb30c459a Mon Sep 17 00:00:00 2001 From: weili Date: Thu, 1 Sep 2016 17:42:11 -0700 Subject: Revert of Fix leaked internal font (patchset #2 id:60001 of https://codereview.chromium.org/2297303004/ ) Reason for revert: asan bot doesn't like it, will investigate Original issue's description: > Fix leaked internal font > > In CFGAS_FontMgrImp::LoadFont(), a new internal font is created which > is never released. It needs to be correctly marked as internal font to > be released. Fix this by adding a boolean parameter and pass it along > during the creation of the font. > > BUG=pdfium:242 > > Committed: https://pdfium.googlesource.com/pdfium/+/6708106e6a3d54f3370c871ebf6643d1ecf58999 TBR=thestig@chromium.org,dsinclair@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=pdfium:242 Review-Url: https://codereview.chromium.org/2302213002 --- xfa/fgas/font/fgas_stdfontmgr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xfa/fgas/font/fgas_stdfontmgr.cpp') diff --git a/xfa/fgas/font/fgas_stdfontmgr.cpp b/xfa/fgas/font/fgas_stdfontmgr.cpp index f79ad46e5e..7e5cfbb796 100644 --- a/xfa/fgas/font/fgas_stdfontmgr.cpp +++ b/xfa/fgas/font/fgas_stdfontmgr.cpp @@ -850,13 +850,13 @@ CFGAS_GEFont* CFGAS_FontMgrImp::LoadFont(const CFX_WideString& wsFaceName, return nullptr; } - std::unique_ptr pInternalFont(new CFX_Font()); + CFX_Font* pInternalFont = new CFX_Font(); if (!pInternalFont->LoadFile(pFontStream, iFaceIndex)) { pFontStream->Release(); return nullptr; } - CFGAS_GEFont* pFont = CFGAS_GEFont::LoadFont(std::move(pInternalFont), this); + CFGAS_GEFont* pFont = CFGAS_GEFont::LoadFont(pInternalFont, this); if (!pFont) { pFontStream->Release(); return nullptr; -- cgit v1.2.3