461452 Double release of buffer by HttpReceiverOverHTTP
Clear buffer on exception to avoid release guard
This commit is contained in:
parent
042de2ec9f
commit
2619edff5a
|
@ -80,6 +80,8 @@ public class HttpReceiverOverHTTP extends HttpReceiver implements HttpParser.Res
|
|||
{
|
||||
if (buffer==null)
|
||||
throw new IllegalStateException();
|
||||
if (BufferUtil.hasContent(buffer))
|
||||
throw new IllegalStateException();
|
||||
HttpClient client = getHttpDestination().getHttpClient();
|
||||
ByteBufferPool bufferPool = client.getByteBufferPool();
|
||||
bufferPool.release(buffer);
|
||||
|
@ -133,6 +135,7 @@ public class HttpReceiverOverHTTP extends HttpReceiver implements HttpParser.Res
|
|||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug(x);
|
||||
BufferUtil.clear(buffer);
|
||||
releaseBuffer();
|
||||
failAndClose(x);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue