Skip to content

Commit 722dcae

Browse files
committed
Fix buffer leak in MultipartParser
This change fixes a buffer leak when the MultipartParser is encountering a body DataBuffer that only contains a boundary. Closes gh-33094
1 parent 850a0de commit 722dcae

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

spring-web/src/main/java/org/springframework/http/codec/multipart/MultipartParser.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,7 @@ else if (len < 0) {
557557
}
558558
else /* if (len == 0) */ {
559559
// buffer starts with complete delimiter, flush out the previous buffers
560+
DataBufferUtils.release(boundaryBuffer);
560561
flush();
561562
}
562563

0 commit comments

Comments
 (0)