summaryrefslogtreecommitdiff
path: root/xfa/fgas/font/fgas_stdfontmgr.cpp
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-09-01 17:42:11 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-01 17:42:11 -0700
commit7e4e63b04f87c690b017c43ebbb3218eb30c459a (patch)
tree8c341dd8f815902f77c7b6a3a569b8d24944b2c2 /xfa/fgas/font/fgas_stdfontmgr.cpp
parent6708106e6a3d54f3370c871ebf6643d1ecf58999 (diff)
downloadpdfium-7e4e63b04f87c690b017c43ebbb3218eb30c459a.tar.xz
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
Diffstat (limited to 'xfa/fgas/font/fgas_stdfontmgr.cpp')
-rw-r--r--xfa/fgas/font/fgas_stdfontmgr.cpp4
1 files changed, 2 insertions, 2 deletions
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<CFX_Font> 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;