#vulnerable code 
                              @Test
  public void testTwoFrames() throws Exception {
    final ZMTPMessageDecoder decoder = new ZMTPMessageDecoder();

    final ByteBuf f0 = Unpooled.copiedBuffer("hello", UTF_8);
    final ByteBuf f1 = Unpooled.copiedBuffer("world", UTF_8);

    final List<Object> out = Lists.newArrayList();
    decoder.header(f0.readableBytes(), true, out);
    decoder.content(f0, out);
    decoder.header(f1.readableBytes(), false, out);
    decoder.content(f1, out);
    decoder.finish(out);

    final Object expected = new ZMTPIncomingMessage(fromUTF8(ALLOC, "hello", "world"), false, 10);
    assertThat(out, hasSize(1));
    assertThat(out, contains(expected));
  } 
                            #location 13 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                              @Test
  public void testTwoFrames() throws Exception {
    final ZMTPMessageDecoder decoder = new ZMTPMessageDecoder();

    final ByteBuf f0 = Unpooled.copiedBuffer("hello", UTF_8);
    final ByteBuf f1 = Unpooled.copiedBuffer("world", UTF_8);

    final List<Object> out = Lists.newArrayList();
    decoder.header(f0.readableBytes(), true, out);
    decoder.content(f0, out);
    decoder.header(f1.readableBytes(), false, out);
    decoder.content(f1, out);
    decoder.finish(out);

    final Object expected = ZMTPMessage.fromUTF8(ALLOC, "hello", "world");
    assertThat(out, hasSize(1));
    assertThat(out, contains(expected));
  }