Commit Graph

6 Commits

Author SHA1 Message Date
Stefan Weil
98d50f6c16 cube: Fix use after free regression
Coverity report:

CID 1366758:  Memory - corruptions  (USE_AFTER_FREE)
Calling "operator delete[]" frees pointer "label32"
 which has already been freed.

Commit f60ff4d575 fixed several memory leaks
but also added this wrong delete operation.

label32 is assigned to char_samp->label32_, so it is freed when deleting
char_samp.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-07 17:18:16 +01:00
Stefan Weil
257d6e8156 cube: Simplify new operations
It is not necessary to check for null pointers after new.

Simplify also two delete operations which were missing
in the previous commit.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-07 17:09:52 +01:00
Stefan Weil
73c0649d98 cube/char_samp: Fix some memory leaks
Coverity report:

CID 1164722 (#9 of 9): Resource leak (RESOURCE_LEAK)
20. leaked_storage: Variable label32 going out of scope leaks the storage
 it points to.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-07 16:22:48 +01:00
theraysmith@gmail.com
e6e6c35ee1 Fixed issue 1114
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@1073 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2014-04-24 00:46:11 +00:00
theraysmith@gmail.com
7f5e5264d3 Fixed issues 1093-1097
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@1048 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2014-02-04 23:36:24 +00:00
zdenop@gmail.com
4523ce9f7d 3.01 code from http://github.com/jimregan/tesseract-ocr with addaptions related to Linux and Windows (VC2008) compile process
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@526 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2010-11-23 18:34:14 +00:00