#vulnerable code 
                              private ByteBuffer decompressBlock(ByteBuffer block) throws IOException {
    Buffers buffers = threadLocalBuffers.get();
    buffers.reset();
    // Decompress the block
    InputStream blockInputStream =
        new ByteArrayInputStream(block.array(), block.arrayOffset() + block.position(), block.remaining());
    // Build an InputStream corresponding to the compression codec
    InputStream decompressedBlockInputStream = getBlockCompressionInputStream(blockInputStream);
    // Decompress into the specialized result buffer
    IOStreamUtils.copy(decompressedBlockInputStream, buffers.getDecompressionOutputStream(), buffers.getCopyBuffer());
    decompressedBlockInputStream.close();
    return buffers.getDecompressionOutputStream().getByteBuffer();
  } 
                            #location 12 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                              private ByteBuffer decompressBlock(ByteBuffer block) throws IOException {
    Local local = threadLocal.get();
    local.reset();
    local.getBlockDecompressor().decompress(
        block.array(),
        block.arrayOffset() + block.position(),
        block.remaining(),
        local.getDecompressionOutputStream());
    return local.getDecompressionOutputStream().getByteBuffer();
  }