lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r886341 - /lucene/lucy/trunk/core/Lucy/Store/Folder.c
Date Wed, 02 Dec 2009 23:31:06 GMT
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);



Mime
View raw message