You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2009/10/28 05:14:31 UTC

svn commit: r830436 - in /lucene/lucy/trunk/core/Lucy: Store/RAMFile.c Test/Store/TestRAMFileHandle.c

Author: marvin
Date: Wed Oct 28 04:14:31 2009
New Revision: 830436

URL: http://svn.apache.org/viewvc?rev=830436&view=rev
Log:
Fix a couple memory leaks.

Modified:
    lucene/lucy/trunk/core/Lucy/Store/RAMFile.c
    lucene/lucy/trunk/core/Lucy/Test/Store/TestRAMFileHandle.c

Modified: lucene/lucy/trunk/core/Lucy/Store/RAMFile.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Store/RAMFile.c?rev=830436&r1=830435&r2=830436&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Store/RAMFile.c (original)
+++ lucene/lucy/trunk/core/Lucy/Store/RAMFile.c Wed Oct 28 04:14:31 2009
@@ -22,6 +22,7 @@
 RAMFile_destroy(RAMFile *self)
 {
     DECREF(self->contents);
+    SUPER_DESTROY(self, RAMFILE);
 }
 
 ByteBuf*

Modified: lucene/lucy/trunk/core/Lucy/Test/Store/TestRAMFileHandle.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Test/Store/TestRAMFileHandle.c?rev=830436&r1=830435&r2=830436&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Test/Store/TestRAMFileHandle.c (original)
+++ lucene/lucy/trunk/core/Lucy/Test/Store/TestRAMFileHandle.c Wed Oct 28 04:14:31 2009
@@ -143,6 +143,7 @@
     ASSERT_TRUE(batch, window->offset == 0, "Release_Window() resets offset");
     ASSERT_TRUE(batch, window->len == 0, "Release_Window() resets len");
 
+    DECREF(window);
     DECREF(fh);
     DECREF(file);
 }