We need to destroy the buffer in case it created a temporary file to hold the content. Signed-off-by: Shawn O. Pearce <spearce@xxxxxxxxxxx> --- .../src/org/spearce/jgit/patch/Patch.java | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/org.spearce.jgit/src/org/spearce/jgit/patch/Patch.java b/org.spearce.jgit/src/org/spearce/jgit/patch/Patch.java index 165058d..d59635a 100644 --- a/org.spearce.jgit/src/org/spearce/jgit/patch/Patch.java +++ b/org.spearce.jgit/src/org/spearce/jgit/patch/Patch.java @@ -105,9 +105,13 @@ public void parse(final InputStream is) throws IOException { private static byte[] readFully(final InputStream is) throws IOException { final TemporaryBuffer b = new TemporaryBuffer(); - b.copy(is); - final byte[] buf = b.toByteArray(); - return buf; + try { + b.copy(is); + b.close(); + return b.toByteArray(); + } finally { + b.destroy(); + } } /** -- 1.6.1.rc2.306.ge5d5e -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html