| Index: core/fpdfapi/edit/fpdf_edit_create.cpp
|
| diff --git a/core/fpdfapi/edit/fpdf_edit_create.cpp b/core/fpdfapi/edit/fpdf_edit_create.cpp
|
| index ac8d709a2e82ab10168c4636db0614b64c960f1b..6c4e3507de157e9f051c691c3dcc70baaa98d5a8 100644
|
| --- a/core/fpdfapi/edit/fpdf_edit_create.cpp
|
| +++ b/core/fpdfapi/edit/fpdf_edit_create.cpp
|
| @@ -470,8 +470,8 @@ CPDF_FlateEncoder::CPDF_FlateEncoder(const uint8_t* pBuffer,
|
| }
|
|
|
| CPDF_FlateEncoder::~CPDF_FlateEncoder() {
|
| - if (m_bCloned && m_pDict)
|
| - m_pDict->Release();
|
| + if (m_bCloned)
|
| + delete m_pDict;
|
| if (m_bNewData)
|
| FX_Free(m_pData);
|
| }
|
| @@ -903,8 +903,8 @@ CPDF_Creator::CPDF_Creator(CPDF_Document* pDoc)
|
|
|
| CPDF_Creator::~CPDF_Creator() {
|
| ResetStandardSecurity();
|
| - if (m_bEncryptCloned && m_pEncryptDict) {
|
| - m_pEncryptDict->Release();
|
| + if (m_bEncryptCloned) {
|
| + delete m_pEncryptDict;
|
| m_pEncryptDict = nullptr;
|
| }
|
| Clear();
|
| @@ -1935,7 +1935,7 @@ void CPDF_Creator::InitID(FX_BOOL bDefault) {
|
| m_pIDArray->Add(pID1->Clone());
|
| } else {
|
| std::vector<uint8_t> buffer =
|
| - PDF_GenerateFileID((uint32_t)(uintptr_t)this, m_dwLastObjNum);
|
| + PDF_GenerateFileID((uint32_t)(uintptr_t) this, m_dwLastObjNum);
|
| CFX_ByteString bsBuffer(buffer.data(), buffer.size());
|
| m_pIDArray->Add(new CPDF_String(bsBuffer, TRUE));
|
| }
|
| @@ -1950,7 +1950,7 @@ void CPDF_Creator::InitID(FX_BOOL bDefault) {
|
| return;
|
| }
|
| std::vector<uint8_t> buffer =
|
| - PDF_GenerateFileID((uint32_t)(uintptr_t)this, m_dwLastObjNum);
|
| + PDF_GenerateFileID((uint32_t)(uintptr_t) this, m_dwLastObjNum);
|
| CFX_ByteString bsBuffer(buffer.data(), buffer.size());
|
| m_pIDArray->Add(new CPDF_String(bsBuffer, TRUE));
|
| return;
|
|
|