You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2012/10/17 01:24:32 UTC

svn commit: r1399042 - /directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/EntryCursorAdaptor.java

Author: elecharny
Date: Tue Oct 16 23:24:32 2012
New Revision: 1399042

URL: http://svn.apache.org/viewvc?rev=1399042&view=rev
Log:
Fixed a potential OOM when dealing with many candidates

Modified:
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/EntryCursorAdaptor.java

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/EntryCursorAdaptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/EntryCursorAdaptor.java?rev=1399042&r1=1399041&r2=1399042&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/EntryCursorAdaptor.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/EntryCursorAdaptor.java Tue Oct 16 23:24:32 2012
@@ -160,7 +160,10 @@ public class EntryCursorAdaptor extends 
 
         if ( evaluator.evaluate( indexEntry ) )
         {
-            return indexEntry.getEntry();
+            Entry entry = indexEntry.getEntry();
+            indexEntry.setEntry( null );
+            
+            return entry;
         }
         else
         {