Skip to content

Commit 03d0b63

Browse files
miere43tocsoft
authored andcommitted
Fix chunk data memory leak when decoding PNG. Fix #2080
1 parent f4f521c commit 03d0b63

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/ImageSharp/Formats/Png/PngDecoderCore.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1367,6 +1367,7 @@ private int ReadNextDataChunk()
13671367
{
13681368
if (chunk.Type == PngChunkType.Data)
13691369
{
1370+
chunk.Data?.Dispose();
13701371
return chunk.Length;
13711372
}
13721373

0 commit comments

Comments
 (0)