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

    final ByteBuf content = Unpooled.copiedBuffer("hello", UTF_8);

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

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

    final ByteBuf content = Unpooled.copiedBuffer("hello", UTF_8);

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

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