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

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: rebase 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
« no previous file with comments | « core/src/fxcodec/codec/fx_codec_fax.cpp ('k') | core/src/fxcodec/codec/fx_codec_icc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a4b37c1ca3629ac319ed0c47e1cd01c1aa2b8c59..e8878e453524d58e28c991315a9189c3582d8cdb 100644
--- a/core/src/fxcodec/codec/fx_codec_flate.cpp
+++ b/core/src/fxcodec/codec/fx_codec_flate.cpp
@@ -647,18 +647,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);
- }
+ FX_Free(m_pScanline);
+ FX_Free(m_pLastLine);
+ FX_Free(m_pPredictBuffer);
+ FX_Free(m_pPredictRaw);
if (m_pFlate) {
FPDFAPI_FlateEnd(m_pFlate);
}
« no previous file with comments | « core/src/fxcodec/codec/fx_codec_fax.cpp ('k') | core/src/fxcodec/codec/fx_codec_icc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698