Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(472)

Unified Diff: core/src/fpdfapi/fpdf_font/fpdf_font.cpp

Issue 1085963002: Fix two new / free mismatches (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | core/src/fpdfdoc/doc_metadata.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_font/fpdf_font.cpp
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
index 91d4010b803e1e06a6594ba8cf85354b1fa36aa5..9ee9621849bed59773945d57397bc34a4d19fb51 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());
}
« no previous file with comments | « no previous file | core/src/fpdfdoc/doc_metadata.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698