Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-1205

RestEasy-Netty4: ByteBuf leak in ResteasyHttpRequestDecoder

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.1.0.Final, 3.0.20.Final
    • 3.0.10.Final, 3.1.0.CR2
    • jaxrs
    • None

      There is a ByteBuf that is created but never released in ResteasyHttpRequestDecoder. Netty reports this with the following log line:

      LEAK: ByteBuf.release() was not called before it's garbage-collected

      There is a retain called on the HttpRequest content before the newly created Bytebuf is added to an input stream. I'm not entirely sure why this retain is required so I have attached two different pull requests to this issue. One that drops the retain and one that releases the Bytebuf. I would appreciate any information on why the retain is necessary.

            gfernand@redhat.com Gustavo Fernandes (Inactive)
            superyizhi YiZhi YiZhi (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: