diff --git a/src/java/org/apache/lucene/index/CheckIndex.java b/src/java/org/apache/lucene/index/CheckIndex.java index a6d47120170..d9ce202b0c1 100644 --- a/src/java/org/apache/lucene/index/CheckIndex.java +++ b/src/java/org/apache/lucene/index/CheckIndex.java @@ -90,6 +90,9 @@ public class CheckIndex { out.println("ERROR: could not read segment file version in directory"); t.printStackTrace(out); return false; + } finally { + if (input != null) + input.close(); } String sFormat = "";