#vulnerable code 
                                @Test
    public void testDecompressionWithZLIB() throws Exception {
        // ZLIB compress message.
        byte[] compressMe = this.originalMessage.getBytes();
        byte[] compressedMessage = new byte[compressMe.length];
        Deflater compressor = new Deflater();
        compressor.setInput(compressMe);
        compressor.finish();
        compressor.deflate(compressedMessage);

        // Build a datagram packet.
        DatagramPacket gelfMessage = new DatagramPacket(compressedMessage, compressedMessage.length);

        // Let the decompression take place.
        SimpleGELFClientHandler handler = new SimpleGELFClientHandler(gelfMessage, "foo");

        assertEquals(handler.getClientMessage(), this.originalMessage);
    } 
                            #location 9 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Test
    public void testDecompressionWithZLIB() throws Exception {
        // Build a datagram packet.
        DatagramPacket gelfMessage = GELFTestHelper.buildZLIBCompressedDatagramPacket(this.originalMessage);

        // Let the decompression take place.
        SimpleGELFClientHandler handler = new SimpleGELFClientHandler(gelfMessage, "foo");

        assertEquals(handler.getClientMessage(), this.originalMessage);
    }