summaryrefslogtreecommitdiffstats
path: root/tools/assistant
diff options
context:
space:
mode:
authorNiklas Kurkisuo <ext-niklas.kurkisuo@nokia.com>2010-12-23 13:48:10 (GMT)
committerHarald Fernengel <harald.fernengel@nokia.com>2010-12-23 13:48:10 (GMT)
commit4d81f771f513a9911a4812b47c6479c85eff0628 (patch)
tree2d582d971ad5d8e440e9f94f32dc72fbca27178e /tools/assistant
parent2e17fb45763493b0680648a00724a9df484836e0 (diff)
downloadQt-4d81f771f513a9911a4812b47c6479c85eff0628.zip
Qt-4d81f771f513a9911a4812b47c6479c85eff0628.tar.gz
Qt-4d81f771f513a9911a4812b47c6479c85eff0628.tar.bz2
Fix resource leak in QCLuceneStopAnalyzer::QCLuceneStopAnalyzer.
CID 22164. Merge-request: 2534 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
Diffstat (limited to 'tools/assistant')
-rw-r--r--tools/assistant/lib/fulltextsearch/qanalyzer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/assistant/lib/fulltextsearch/qanalyzer.cpp b/tools/assistant/lib/fulltextsearch/qanalyzer.cpp
index 835b72e..23a9f14 100644
--- a/tools/assistant/lib/fulltextsearch/qanalyzer.cpp
+++ b/tools/assistant/lib/fulltextsearch/qanalyzer.cpp
@@ -147,6 +147,12 @@ QCLuceneStopAnalyzer::QCLuceneStopAnalyzer(const QStringList &stopWords)
tArray[stopWords.count()] = 0;
d->analyzer = new lucene::analysis::StopAnalyzer(tArray);
+
+ // free memory
+ for(int i = 0; i < stopWords.count(); ++i) {
+ delete [] tArray[i];
+ }
+ delete [] tArray;
}
QStringList QCLuceneStopAnalyzer::englishStopWords() const