Skip to content

Commit

Permalink
Merge pull request #524 from stweil/coverity
Browse files Browse the repository at this point in the history
Fix two new coverity warnings
  • Loading branch information
egorpugin authored Dec 3, 2016
2 parents 4ac54a2 + 7e3ff36 commit 3e11fc1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 2 additions & 4 deletions ccmain/cube_control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,8 @@ bool Tesseract::init_cube_objects(bool load_combiner,
if (!tess_cube_combiner_->LoadCombinerNet()) {
delete cube_cntxt_;
cube_cntxt_ = NULL;
if (tess_cube_combiner_ != NULL) {
delete tess_cube_combiner_;
tess_cube_combiner_ = NULL;
}
delete tess_cube_combiner_;
tess_cube_combiner_ = NULL;
if (cube_debug_level > 0)
tprintf("Cube ERROR (Failed to instantiate TesseractCubeCombiner\n");
return false;
Expand Down
1 change: 0 additions & 1 deletion cube/char_samp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ CharSamp *CharSamp::FromCharDumpFile(CachedFile *fp) {
// load the Bmp8 part
if (char_samp->LoadFromCharDumpFile(fp) == false) {
delete char_samp;
delete [] label32;
return NULL;
}
return char_samp;
Expand Down

0 comments on commit 3e11fc1

Please sign in to comment.