summaryrefslogtreecommitdiffstats
path: root/tools/assistant/lib
diff options
context:
space:
mode:
authorNiklas Kurkisuo <ext-niklas.kurkisuo@nokia.com>2010-12-23 13:48:12 (GMT)
committerHarald Fernengel <harald.fernengel@nokia.com>2010-12-23 13:48:12 (GMT)
commite18dfbc2f5cc99aca1ff7abbab5f9b3be2bfed73 (patch)
tree5a14934af74a1d33c6a47411ca8a773cab7eb1cb /tools/assistant/lib
parent4d81f771f513a9911a4812b47c6479c85eff0628 (diff)
downloadQt-e18dfbc2f5cc99aca1ff7abbab5f9b3be2bfed73.zip
Qt-e18dfbc2f5cc99aca1ff7abbab5f9b3be2bfed73.tar.gz
Qt-e18dfbc2f5cc99aca1ff7abbab5f9b3be2bfed73.tar.bz2
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')
-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 23a9f14..db2f06c 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;
}