summaryrefslogtreecommitdiff
path: root/tools/assistant/lib/fulltextsearch/qanalyzer.cpp
diff options
context:
space:
mode:
authorNiklas Kurkisuo <ext-niklas.kurkisuo@nokia.com>2010-12-23 14:48:12 +0100
committerHarald Fernengel <harald.fernengel@nokia.com>2010-12-23 14:48:12 +0100
commite18dfbc2f5cc99aca1ff7abbab5f9b3be2bfed73 (patch)
tree5a14934af74a1d33c6a47411ca8a773cab7eb1cb /tools/assistant/lib/fulltextsearch/qanalyzer.cpp
parent4d81f771f513a9911a4812b47c6479c85eff0628 (diff)
downloadqt4-tools-e18dfbc2f5cc99aca1ff7abbab5f9b3be2bfed73.tar.gz
Fix resource leak in QCLuceneStandardAnalyzer::QCLuceneStandardAnalyzer.
CID 22165. Merge-request: 2534 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
Diffstat (limited to 'tools/assistant/lib/fulltextsearch/qanalyzer.cpp')
-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 23a9f141f1..db2f06ceea 100644
--- a/tools/assistant/lib/fulltextsearch/qanalyzer.cpp
+++ b/tools/assistant/lib/fulltextsearch/qanalyzer.cpp
@@ -96,6 +96,12 @@ QCLuceneStandardAnalyzer::QCLuceneStandardAnalyzer(const QStringList &stopWords)
tArray[stopWords.count()] = 0;
d->analyzer = new lucene::analysis::standard::StandardAnalyzer(tArray);
+
+ // free memory
+ for(int i = 0; i < stopWords.count(); ++i) {
+ delete [] tArray[i];
+ }
+ delete [] tArray;
}