diff --git a/src/core/CLucene/index/DirectoryIndexReader.cpp b/src/core/CLucene/index/DirectoryIndexReader.cpp index 15020ee..0456dc5 100644 --- a/src/core/CLucene/index/DirectoryIndexReader.cpp +++ b/src/core/CLucene/index/DirectoryIndexReader.cpp @@ -274,6 +274,9 @@ CL_NS_DEF(index) */ void DirectoryIndexReader::startCommit() { if (segmentInfos != NULL) { + if (rollbackSegmentInfos != NULL) { + _CLDELETE(rollbackSegmentInfos); + } rollbackSegmentInfos = segmentInfos->clone(); } rollbackHasChanges = hasChanges;