summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBo Xu <bo_xu@foxitsoftware.com>2014-08-28 11:49:17 -0700
committerBo Xu <bo_xu@foxitsoftware.com>2014-08-28 11:49:17 -0700
commitf105b19434fdeecac2dd2f78fed5b45ed2637ab3 (patch)
tree27b483383ebd751b22eb6b804675620d1df0792b
parentfdcc8744f8f7d807bf0dbc761cdc8d6a6e0798cb (diff)
downloadpdfium-f105b19434fdeecac2dd2f78fed5b45ed2637ab3.tar.xz
No need to release resources in destructor of CPDF_ShadingObjectchromium/2145chromium/2144chromium/2143chromium/2142chromium/2141chromium/2140
CPDF_DocPageData::~CPDF_DocPageData() will force to release all resources, so no need to do it here, which can result in heap-use-after-free trouble. BUG=408164 R=jun_fang@foxitsoftware.com, tsepez@chromium.org Review URL: https://codereview.chromium.org/513063003
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
index 6d3cf29785..590a01aa6d 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
@@ -606,10 +606,6 @@ CPDF_ShadingObject::CPDF_ShadingObject()
}
CPDF_ShadingObject::~CPDF_ShadingObject()
{
- CPDF_ShadingPattern* pShading = m_pShading;
- if (pShading && pShading->m_pDocument) {
- pShading->m_pDocument->GetPageData()->ReleasePattern(pShading->m_pShadingObj);
- }
}
void CPDF_ShadingObject::CopyData(const CPDF_PageObject* pSrc)
{