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 2011/12/31 22:46:09 UTC
[lucy-commits] svn commit: r1226194 - in /incubator/lucy/branches/0.3: ./
core/Lucy/Index/Indexer.c perl/t/111-index_manager.t
Author: marvin
Date: Sat Dec 31 21:46:08 2011
New Revision: 1226194
URL: http://svn.apache.org/viewvc?rev=1226194&view=rev
Log:
Don't leak memory on Bad IxManager_Recycle().
Modified:
incubator/lucy/branches/0.3/ (props changed)
incubator/lucy/branches/0.3/core/Lucy/Index/Indexer.c
incubator/lucy/branches/0.3/perl/t/111-index_manager.t
Propchange: incubator/lucy/branches/0.3/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Dec 31 21:46:08 2011
@@ -1 +1 @@
-/incubator/lucy/trunk:1225600-1225601,1226190
+/incubator/lucy/trunk:1225600-1225601,1226190-1226191
Modified: incubator/lucy/branches/0.3/core/Lucy/Index/Indexer.c
URL: http://svn.apache.org/viewvc/incubator/lucy/branches/0.3/core/Lucy/Index/Indexer.c?rev=1226194&r1=1226193&r2=1226194&view=diff
==============================================================================
--- incubator/lucy/branches/0.3/core/Lucy/Index/Indexer.c (original)
+++ incubator/lucy/branches/0.3/core/Lucy/Index/Indexer.c Sat Dec 31 21:46:08 2011
@@ -425,6 +425,8 @@ S_maybe_merge(Indexer *self, VArray *seg
= (SegReader*)CERTIFY(VA_Fetch(to_merge, i), SEGREADER);
CharBuf *seg_name = SegReader_Get_Seg_Name(seg_reader);
if (Hash_Fetch(seen, (Obj*)seg_name)) {
+ DECREF(seen);
+ DECREF(to_merge);
THROW(ERR, "Recycle() tried to merge segment '%o' twice",
seg_name);
}
Modified: incubator/lucy/branches/0.3/perl/t/111-index_manager.t
URL: http://svn.apache.org/viewvc/incubator/lucy/branches/0.3/perl/t/111-index_manager.t?rev=1226194&r1=1226193&r2=1226194&view=diff
==============================================================================
--- incubator/lucy/branches/0.3/perl/t/111-index_manager.t (original)
+++ incubator/lucy/branches/0.3/perl/t/111-index_manager.t Sat Dec 31 21:46:08 2011
@@ -117,12 +117,10 @@ $manager->set_deletion_lock_interval(6);
is( $manager->get_deletion_lock_interval,
6, "set/get deletion lock interval" );
-SKIP: {
- skip( "Known leak", 1 ) if $ENV{LUCY_VALGRIND};
- my $indexer = Lucy::Index::Indexer->new(
- index => $folder,
- manager => BogusManager->new,
- );
- eval { $indexer->commit };
- like( $@, qr/recycle/i, "duplicated segment via recycle triggers error" );
-}
+my $indexer = Lucy::Index::Indexer->new(
+ index => $folder,
+ manager => BogusManager->new,
+);
+eval { $indexer->commit };
+like( $@, qr/recycle/i, "duplicated segment via recycle triggers error" );
+