diff options
author | Lei Zhang <thestig@chromium.org> | 2015-06-19 17:26:17 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-06-19 17:26:17 -0700 |
commit | 6d8b1c2c7b1cbada20109f70ae971a4192330bb5 (patch) | |
tree | e755b7cb2624622cba606134493d25fb7f1ce6c8 /core/src/fxcodec/codec | |
parent | 9883a7da2d4f31910073c03e703d5b97a45d9254 (diff) | |
download | pdfium-6d8b1c2c7b1cbada20109f70ae971a4192330bb5.tar.xz |
Merge to XFA: Cleanup: Do not check pointers before deleting them.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1192743004.
(cherry picked from commit cfac954abcab7caf47d3fa3d641c553cba998271)
Review URL: https://codereview.chromium.org/1196783003.
Diffstat (limited to 'core/src/fxcodec/codec')
-rw-r--r-- | core/src/fxcodec/codec/fx_codec_icc.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/core/src/fxcodec/codec/fx_codec_icc.cpp b/core/src/fxcodec/codec/fx_codec_icc.cpp index 703d00a496..da503c03fd 100644 --- a/core/src/fxcodec/codec/fx_codec_icc.cpp +++ b/core/src/fxcodec/codec/fx_codec_icc.cpp @@ -514,17 +514,13 @@ CCodec_IccModule::~CCodec_IccModule() CFX_IccProfileCache* pProfileCache; while (pos) { m_MapProfile.GetNextAssoc(pos, key, (void*&)pProfileCache); - if (pProfileCache) { - delete pProfileCache; - } + delete pProfileCache; } pos = m_MapTranform.GetStartPosition(); CFX_IccTransformCache* pTransformCache; while (pos) { m_MapTranform.GetNextAssoc(pos, key, (void*&)pTransformCache); - if (pTransformCache) { - delete pTransformCache; - } + delete pTransformCache; } } void* CCodec_IccModule::CreateTransform_sRGB(const uint8_t* pProfileData, FX_DWORD dwProfileSize, int32_t& nComponents, int32_t intent, FX_DWORD dwSrcFormat) |