3 Nov
2025
3 Nov
'25
1:26 p.m.
On Mon Nov 3 13:14:16 2025 +0000, Vibhav Pant wrote:
Do we not need to wrap this and `CreateExceptionWithMessage` inside a `__FINALLY_CTX` to clean up any partial allocations in case of an exception being thrown? For instance, `CreateExcception(S_OK)` throws an `InvalidArgumentException` inside the constructor, wouldn't that leak the allocation from `AllocateExceptionWithWeakRef`? Yes, it's leaking on error paths. It's better to release the buffers before throwing exception instead of using \__FINALLY_CTX. Could you please update the code?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/9209#note_120506