mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-18 06:30:14 +08:00
Classify: Fix new resource leak (CID 1396163)
This fixes a warnings from Coverity Scan. Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
edbd07a5f9
commit
146d2caa9d
@ -1543,7 +1543,10 @@ void Classify::DoAdaptiveMatch(TBLOB *Blob, ADAPT_RESULTS *Results) {
|
||||
|
||||
// TODO: With LSTM, static_classifier_ is nullptr.
|
||||
// Return to avoid crash in CharNormClassifier.
|
||||
if (static_classifier_ == nullptr) return;
|
||||
if (static_classifier_ == nullptr) {
|
||||
delete sample;
|
||||
return;
|
||||
}
|
||||
|
||||
if (AdaptedTemplates->NumPermClasses < matcher_permanent_classes_min ||
|
||||
tess_cn_matching) {
|
||||
|
Loading…
Reference in New Issue
Block a user