diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-04-14 16:00:03 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-04-14 16:00:03 -0700 |
commit | b48704f27fa425d0c4f5b0040cc11e4087c39016 (patch) | |
tree | 64708fe85e56c1a7c8e99ddb48c9c127c001f728 /core/src/fpdfapi | |
parent | 4926900ab54a493d236291b5a24dfa4476792182 (diff) | |
download | pdfium-b48704f27fa425d0c4f5b0040cc11e4087c39016.tar.xz |
Land on Master: Fix two new / free mismatches
Note: Landed on XFA first by mistake.
Original review: https://codereview.chromium.org/1085963002/
TBR=brucedawson@chromium.org
Review URL: https://codereview.chromium.org/1090463002
Diffstat (limited to 'core/src/fpdfapi')
-rw-r--r-- | core/src/fpdfapi/fpdf_font/fpdf_font.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp index 91d4010b80..9ee9621849 100644 --- a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp +++ b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp @@ -128,14 +128,12 @@ FX_BOOL CPDF_Font::Initialize() } CPDF_Font::~CPDF_Font() { - if (m_pCharMap) { - FX_Free(m_pCharMap); - m_pCharMap = NULL; - } - if (m_pToUnicodeMap) { - delete m_pToUnicodeMap; - m_pToUnicodeMap = NULL; - } + delete m_pCharMap; + m_pCharMap = NULL; + + delete m_pToUnicodeMap; + m_pToUnicodeMap = NULL; + if (m_pFontFile) { m_pDocument->GetPageData()->ReleaseFontFileStreamAcc((CPDF_Stream*)m_pFontFile->GetStream()); } |