summaryrefslogtreecommitdiff
path: root/core/fxge/cfx_font.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-12 13:38:55 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-12 13:38:55 +0000
commit909c6e7d2623f76dee27502d693f8b4fbb8b7649 (patch)
tree44a0ed5c4e6288b9b9c4a4a02fb798c6d022a3e1 /core/fxge/cfx_font.cpp
parent101535f463dda5766f99b66f383672d5898556fe (diff)
downloadpdfium-909c6e7d2623f76dee27502d693f8b4fbb8b7649.tar.xz
Remove explicit calls to FXFT_Clear_Face_External_Stream().
This landed earlier as part of a larger change that got reverted for unrelated reasons. Now re-land it by itself. See https://pdfium-review.googlesource.com/c/pdfium/+/33370 The current code could cause FT to try to free memory allocated by the caller, with potentially a different allocator. It appears that this may have been added ages ago as a way to kludge around a leak. If we're leaking, msan will find it, and we can deal with it properly rather than trying to force FT to tidy after us. Change-Id: I20abf4cd35d465de1f435ebe6d94b10c3ff74002 Reviewed-on: https://pdfium-review.googlesource.com/34930 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxge/cfx_font.cpp')
-rw-r--r--core/fxge/cfx_font.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/core/fxge/cfx_font.cpp b/core/fxge/cfx_font.cpp
index bee1d789ef..08e33d6397 100644
--- a/core/fxge/cfx_font.cpp
+++ b/core/fxge/cfx_font.cpp
@@ -317,14 +317,9 @@ void CFX_Font::SetSubstFont(std::unique_ptr<CFX_SubstFont> subst) {
#endif // PDF_ENABLE_XFA
CFX_Font::~CFX_Font() {
- if (m_Face) {
-#ifndef PDF_ENABLE_XFA
- if (FXFT_Get_Face_External_Stream(m_Face)) {
- FXFT_Clear_Face_External_Stream(m_Face);
- }
-#endif // PDF_ENABLE_XFA
+ if (m_Face)
DeleteFace();
- }
+
#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
ReleasePlatformResource();
#endif