diff options
author | Peng Wu <alexepico@gmail.com> | 2013-06-17 16:01:46 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2013-06-17 16:01:46 +0800 |
commit | a6879516feb3e906ba1d0ed7847300bcfee7e092 (patch) | |
tree | 765c799b8996c190925c93d17c1ef73556cab9f2 /src | |
parent | 5049635bc3b6c1e261c57774e79345876644dfa2 (diff) | |
download | libpinyin-a6879516feb3e906ba1d0ed7847300bcfee7e092.tar.gz libpinyin-a6879516feb3e906ba1d0ed7847300bcfee7e092.tar.xz libpinyin-a6879516feb3e906ba1d0ed7847300bcfee7e092.zip |
fixes memory leaks
Diffstat (limited to 'src')
-rw-r--r-- | src/storage/phrase_index.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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; |