| Summary: | D3D_RenderReadPixels - possible memory leak | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Konrad <iryont> |
| Component: | render | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P2 | ||
| Version: | HG 2.1 | ||
| Hardware: | x86_64 | ||
| OS: | All | ||
| Attachments: | Fix | ||
Actually, it looks like releasing the backbuffer isn't correct here, and should be removed from the error handling. We're just copying the pointer at the top of the function, not increasing the reference count to it... Ahh, you are perfectly right. I was using GetRenderTarget myself in a different application which does increase ref count, but I didn't notice that SDL2 does not get it, but just copy the already acquired pointer. I fixed it so it doesn't release the backbuffer on error. Thanks! |
Created attachment 4243 [details] Fix It appears that backbuffer is not released at the end of the function like in any previous error return within if. Patch included.