summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_font
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-04-14 15:55:35 -0700
committerTom Sepez <tsepez@chromium.org>2015-04-14 15:55:35 -0700
commit35d0c9a7a442cf1305913fb2de2c6f99842ea586 (patch)
tree8aaa4fb942e7b4097bfd3e4fd12414d2781ee4d2 /core/src/fpdfapi/fpdf_font
parent3da4f9e6bffdf9e5ae4295806446cb69e363eb9c (diff)
downloadpdfium-35d0c9a7a442cf1305913fb2de2c6f99842ea586.tar.xz
Fix two new / free mismatches
R=brucedawson@chromium.org Review URL: https://codereview.chromium.org/1085963002
Diffstat (limited to 'core/src/fpdfapi/fpdf_font')
-rw-r--r--core/src/fpdfapi/fpdf_font/fpdf_font.cpp14
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());
}