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

Unified Diff: core/src/fxcodec/codec/fx_codec_flate.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/fxcodec/codec/fx_codec_flate.cpp
diff --git a/core/src/fxcodec/codec/fx_codec_flate.cpp b/core/src/fxcodec/codec/fx_codec_flate.cpp
index 91d28b055394ae5a9ae9fe504b09f2cc645ebe94..93b4b6008da3eb0035829f9f3a44adad672ec807 100644
--- a/core/src/fxcodec/codec/fx_codec_flate.cpp
+++ b/core/src/fxcodec/codec/fx_codec_flate.cpp
@@ -641,18 +641,10 @@ CCodec_FlateScanlineDecoder::CCodec_FlateScanlineDecoder() {
m_LeftOver = 0;
}
CCodec_FlateScanlineDecoder::~CCodec_FlateScanlineDecoder() {
- if (m_pScanline) {
FX_Free(m_pScanline);
- }
- if (m_pLastLine) {
FX_Free(m_pLastLine);
- }
- if (m_pPredictBuffer) {
FX_Free(m_pPredictBuffer);
- }
- if (m_pPredictRaw) {
FX_Free(m_pPredictRaw);
- }
if (m_pFlate) {
FPDFAPI_FlateEnd(m_pFlate);
}

Powered by Google App Engine
This is Rietveld 408576698