Skip to content

DataBufferUtils#join may release a DataBuffer more than necessary #26060

@rstoyanchev

Description

@rstoyanchev

This is based on investigation under reactor/reactor-netty#1374.

In DataBufferUtils#join we use a custom List to collect buffers and check the total buffered size. When a buffer is added that hits the limit, an error is raised but this causes a double release of the current buffer because Reactor's MonoCollect discards both the item that was passed to the add method and all items in the list. That leads to a double decrease of the refCount when it should be decremented only once.

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions