From a6879516feb3e906ba1d0ed7847300bcfee7e092 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Mon, 17 Jun 2013 16:01:46 +0800 Subject: fixes memory leaks --- src/storage/phrase_index.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/storage/phrase_index.cpp b/src/storage/phrase_index.cpp index 930d606..5fe61c2 100644 --- a/src/storage/phrase_index.cpp +++ b/src/storage/phrase_index.cpp @@ -458,8 +458,12 @@ bool SubPhraseIndex::merge(PhraseIndexLogger * logger){ olditem.m_chunk.set_chunk(oldchunk.begin(), oldchunk.size(), NULL); - if (olditem != *tmpitem) + + if (olditem != *tmpitem) { + delete tmpitem; return false; + } + delete tmpitem; break; -- cgit