Skip to content

Commit

Permalink
ccutil/tessdatamanager: Fix resource leak
Browse files Browse the repository at this point in the history
Coverity report:

CID 1340278 (#1 of 1): Resource leak (RESOURCE_LEAK)
11. leaked_storage: Variable output_file going out of scope leaks the storage it points to.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Oct 24, 2016
1 parent 1327551 commit a351dae
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ccutil/tessdatamanager.cpp
Expand Up @@ -139,6 +139,7 @@ bool TessdataManager::CombineDataFiles(
if (fseek(output_file,
sizeof(inT32) + sizeof(inT64) * TESSDATA_NUM_ENTRIES, SEEK_SET)) {
tprintf("Error seeking %s\n", output_filename);
fclose(output_file);
return false;
}

Expand Down

0 comments on commit a351dae

Please sign in to comment.