Skip to content

Conversation

@ilai-deutel
Copy link
Contributor

When creating the WebPAnimDecoder object, we create a WebPAnimDecoderObject and populate its data using WebPDataCopy().

Subsequently, if either WebPAnimDecoderNew() or WebPAnimDecoderGetInfo() fails, data is not currently deallocated, which may cause memory leaks.

This PR clears the decoder object's data in that situation.

When creating the `WebPAnimDecoder` object, we create a `WebPAnimDecoderObject` and populate its data using `WebPDataCopy()`.

Subsequently, if either `WebPAnimDecoderNew()` or `WebPAnimDecoderGetInfo()` fails, data is not currently deallocated. This commit clears the decoder object's data in that situation.
@radarhere
Copy link
Member

Thanks

@radarhere radarhere merged commit 06372b5 into python-pillow:main Dec 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants