Index: core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp |
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp |
index 21b2fbae8a99e7d0436da086eae83b784e9c1cdb..1d50346bdb78b66d72f8487caa6484b3eae631c9 100644 |
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp |
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp |
@@ -1732,9 +1732,7 @@ CPDF_SyntaxParser::CPDF_SyntaxParser() { |
m_bFileStream = FALSE; |
} |
CPDF_SyntaxParser::~CPDF_SyntaxParser() { |
- if (m_pFileBuf) { |
FX_Free(m_pFileBuf); |
- } |
} |
FX_BOOL CPDF_SyntaxParser::GetCharAt(FX_FILESIZE pos, uint8_t& ch) { |
FX_FILESIZE save_pos = m_Pos; |
@@ -2589,10 +2587,8 @@ CPDF_Stream* CPDF_SyntaxParser::ReadStream(CPDF_Dictionary* pDict, |
} |
void CPDF_SyntaxParser::InitParser(IFX_FileRead* pFileAccess, |
FX_DWORD HeaderOffset) { |
- if (m_pFileBuf) { |
FX_Free(m_pFileBuf); |
m_pFileBuf = NULL; |
- } |
m_pFileBuf = FX_Alloc(uint8_t, m_BufSize); |
m_HeaderOffset = HeaderOffset; |
m_FileLen = pFileAccess->GetSize(); |