From d9376594a86ff45dad2d3a3b7284e0c1f7ce711c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zdenko=20Podobn=C3=BD?= Date: Mon, 27 Jul 2015 20:58:54 +0200 Subject: [PATCH] fix memmory leak based on issue 1488 (https://code.google.com/p/tesseract-ocr/issues/detail?id=1488) --- training/cntraining.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/training/cntraining.cpp b/training/cntraining.cpp index 5af05a62..ab19ddb9 100644 --- a/training/cntraining.cpp +++ b/training/cntraining.cpp @@ -167,6 +167,8 @@ int main(int argc, char* argv[]) pCharList = CharList; iterate(pCharList) { //Cluster + if (Clusterer) + FreeClusterer(Clusterer); CharSample = (LABELEDLIST)first_node(pCharList); Clusterer = SetUpForClustering(FeatureDefs, CharSample, PROGRAM_FEATURE_TYPE);