R��mi Bernon (@rbernon) commented about dlls/windows.media.speech/async.c:
struct async_void *impl = impl_from_IAsyncAction(iface); ULONG ref = InterlockedDecrement(&impl->ref); TRACE("iface %p, ref %lu.\n", iface, ref);
- if (!ref)
- {
IAsyncInfo_Close(&impl->IAsyncInfo_iface);
if (impl->invoker)
IInspectable_Release(impl->invoker);
if (impl->handler && impl->handler != HANDLER_NOT_SET)
IAsyncActionCompletedHandler_Release(impl->handler);
DeleteCriticalSection(&impl->cs);
You should set the spare pointer back to 0 before deleting the CS.