FAQ
Author: marvin
Date: Wed Dec 2 23:31:06 2009
New Revision: 886341

URL: http://svn.apache.org/viewvc?rev=886341&view=rev
Log:
Fix bogus creation of a CompoundFileReader within Folder_Consolidate() when an
empty string "path" is passed, indicating that the Folder should consolidate
itself rather than a subfolder. This fixes a memory leak in
TestCompoundFileReader.

Modified:
lucene/lucy/trunk/core/Lucy/Store/Folder.c

Modified: lucene/lucy/trunk/core/Lucy/Store/Folder.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Store/Folder.c?rev=886341&r1=886340&r2=886341&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Store/Folder.c (original)
+++ lucene/lucy/trunk/core/Lucy/Store/Folder.c Wed Dec 2 23:31:06 2009
@@ -384,7 +384,7 @@
CompoundFileWriter *cf_writer = CFWriter_new(folder);
CFWriter_Consolidate(cf_writer);
DECREF(cf_writer);
- {
+ if (CB_Get_Size(path)) {
ZombieCharBuf name_zcb = ZCB_BLANK;
ZombieCharBuf *name = IxFileNames_local_part(path, &name_zcb);
CompoundFileReader *cf_reader = CFReader_open(folder);

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouplucy-commits @
categorieslucene
postedDec 2, '09 at 11:31p
activeDec 2, '09 at 11:31p
posts1
users1
websitelucene.apache.org

1 user in discussion

Marvin: 1 post

People

Translate

site design / logo © 2018 Grokbase