The problem is pre-existing to https://gitlab.winehq.org/wine/wine/-/merge_requests/8782 . When there is just an event and no completion routine iosb pointer should still be passed to NtDeviceIoControlFile and the storage should persist until the completion, currently ctxt is leaked in such a case. Yet there is no way to get the IOSB data in this case by the app or us in iphlpapi, so in this case we can just use static IOSB and let writes to it freely race.