summaryrefslogtreecommitdiff
path: root/core/src/fxcodec/jbig2
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-07-16 18:28:49 -0700
committerLei Zhang <thestig@chromium.org>2015-07-16 18:28:49 -0700
commit21bf242a31eff79f754c5e9c3b41c52e33483bb0 (patch)
tree0eff85fa75ab9091254f7560b37b95408ba8975e /core/src/fxcodec/jbig2
parent6915e7bd9e0892f143936697c6ba233510fb13dc (diff)
downloadpdfium-21bf242a31eff79f754c5e9c3b41c52e33483bb0.tar.xz
Cleanup: Do not check pointers before deleting them, part 2.
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1195363002 .
Diffstat (limited to 'core/src/fxcodec/jbig2')
-rw-r--r--core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp b/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
index 929180e0b5..622f04b160 100644
--- a/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
@@ -3027,9 +3027,7 @@ CJBig2_SymbolDict *CJBig2_SDDProc::decode_Huffman(CJBig2_BitStream *pStream,
return pDict;
failed:
for(I = 0; I < NSYMSDECODED; I++) {
- if (SDNEWSYMS[I]) {
- delete SDNEWSYMS[I];
- }
+ delete SDNEWSYMS[I];
}
m_pModule->JBig2_Free(SDNEWSYMS);
if(SDREFAGG == 0) {
@@ -3094,15 +3092,11 @@ CJBig2_Image *CJBig2_HTRDProc::decode_Arith(CJBig2_ArithDecoder *pArithDecoder,
}
}
m_pModule->JBig2_Free(GI);
- if(HSKIP) {
- delete HSKIP;
- }
+ delete HSKIP;
delete pGID;
return HTREG;
failed:
- if(HSKIP) {
- delete HSKIP;
- }
+ delete HSKIP;
delete pGID;
delete HTREG;
return NULL;