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

Unified Diff: core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp

Issue 1195363002: Cleanup: Do not check pointers before deleting them, part 2. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: nits Created 5 years, 5 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/fpdfapi/fpdf_render/fpdf_render_image.cpp ('k') | core/src/fxge/agg/src/fx_agg_driver.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
diff --git a/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp b/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
index 929180e0b508d9937d5cd55e0fc6a48e1e2385dc..622f04b160bc30b59b52fe87cc072a4fb97cfdb5 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;
« no previous file with comments | « core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp ('k') | core/src/fxge/agg/src/fx_agg_driver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698