Piotr Caban (@piotr) commented about dlls/vccorlib140/except.c:
WINRT_EXCEPTIONS #undef WINRT_EXCEPTION
+static void CALLBACK create_exception_cleanup(BOOL normal, void *ctx) +{ + struct Exception *excp = ctx; + + if (!excp) /* AllocateExceptionWithWeakRef failed, so we don't need to do anything. */ + return; + /* Exception_ctor zeros inner before any exceptions are thrown, so it is not uninitialized. */ + SysFreeString(excp->inner.description); + SysFreeString(excp->inner.restricted_desc); + /* Since AllocateExceptionWithWeakRef succeeded, control_block is valid. */ + IWeakReference_Release(&excp->control_block->IWeakReference_iface); + FreeException(excp); Is there any reason for not calling IInspectable_Release(&excp-\>IInspectable_iface) here?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/9209#note_120521