https://bugs.winehq.org/show_bug.cgi?id=56954
--- Comment #6 from Fabian Maurer dark.shadow4@web.de --- Problem is that in "ntlm_check_version" the context is empty:
struct ntlm_ctx ctx = { 0 };
This also sets the mode to 0.
Later in ntlm_cleanup we have
if (!ctx || (ctx->mode != MODE_CLIENT && ctx->mode != MODE_SERVER)) return STATUS_INVALID_HANDLE;
So when MODE_CLIENT is no longer 0, this won't clean up.
Created a MR: https://gitlab.winehq.org/wine/wine/-/merge_requests/6073