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

Unified Diff: core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp

Issue 1297713003: Don't bother checking pointers before delete[] and FX_Free(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 5 years, 4 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
Index: core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
index e066957e6290a4bd8a0cc0d2f85950dfaf0a7207..f58b9150d67d5dfa3b53ebef1add68689e7c8f54 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
@@ -182,17 +182,11 @@ CPDF_DIBSource::CPDF_DIBSource() {
}
CPDF_DIBSource::~CPDF_DIBSource() {
delete m_pStreamAcc;
- if (m_pMaskedLine) {
FX_Free(m_pMaskedLine);
- }
- if (m_pLineBuf) {
FX_Free(m_pLineBuf);
- }
m_pCachedBitmap.reset();
delete m_pDecoder;
- if (m_pCompData) {
FX_Free(m_pCompData);
- }
CPDF_ColorSpace* pCS = m_pColorSpace;
if (pCS && m_pDocument) {
m_pDocument->GetPageData()->ReleaseColorSpace(pCS->GetArray());

Powered by Google App Engine
This is Rietveld 408576698