#vulnerable code 
                                @Test
    public void testAvailable() throws Exception {
        final byte[] input = new byte[] {'a', 'b', 'c'};
        final SessionInputBufferMock receiver = new SessionInputBufferMock(input);
        final IdentityInputStream instream = new IdentityInputStream(receiver);
        instream.read();
        Assert.assertEquals(2, instream.available());
    } 
                            #location 7 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Test
    public void testAvailable() throws Exception {
        final byte[] input = new byte[] {'a', 'b', 'c'};
        final SessionInputBufferMock receiver = new SessionInputBufferMock(input);
        final IdentityInputStream instream = new IdentityInputStream(receiver);
        instream.read();
        Assert.assertEquals(2, instream.available());
        instream.close();
    }