Skip to content

Release fix memory leak#2571

Open
iurisilvio wants to merge 12 commits into
Automattic:masterfrom
iurisilvio:release-fix-memory-leak
Open

Release fix memory leak#2571
iurisilvio wants to merge 12 commits into
Automattic:masterfrom
iurisilvio:release-fix-memory-leak

Conversation

@iurisilvio
Copy link
Copy Markdown

Thanks for contributing!

  • Have you updated CHANGELOG.md?

The rotate90 and rotate270 lambdas in rotatePixels() allocated a
temporary 'unrotated' buffer via 'new uint8_t[n_bytes]' but never
freed it. Every JPEG decoded with EXIF orientation 90, 180, or 270
leaked the full pixel buffer (width * height * 4 bytes) — typically
several MiB per call.

Also corrects a 'new[]' / 'free()' allocator mismatch in
decodeJPEGIntoSurface's OOM error path (delete[] is the correct
deallocator for arrays allocated with new[]).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant