From 28c464c65846b4d99a4b1440696e8dc75da2674e Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Tue, 22 Nov 2011 20:18:43 +0000 Subject: [PATCH] LUCENE-3200: Add extra safety to MMapDirectory (as it could still use unmapped curBuf)! git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1205152 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/src/java/org/apache/lucene/store/MMapDirectory.java | 1 + 1 file changed, 1 insertion(+) diff --git a/lucene/src/java/org/apache/lucene/store/MMapDirectory.java b/lucene/src/java/org/apache/lucene/store/MMapDirectory.java index 229415f473c..02abe92c0da 100644 --- a/lucene/src/java/org/apache/lucene/store/MMapDirectory.java +++ b/lucene/src/java/org/apache/lucene/store/MMapDirectory.java @@ -412,6 +412,7 @@ public class MMapDirectory extends FSDirectory { @Override public void close() throws IOException { + curBuf = null; curBufIndex = 0; try { if (isClone || buffers == null) return; for (int bufNr = 0; bufNr < buffers.length; bufNr++) {