msv1_0: Avoid double free when SpInitLsaModeContext fails.

This commit is contained in:
Rémi Bernon 2023-01-13 12:13:07 +01:00 committed by Alexandre Julliard
parent 3a143c0938
commit b17629045f

View file

@ -862,7 +862,7 @@ static NTSTATUS NTAPI ntlm_SpInitLsaModeContext( LSA_SEC_HANDLE cred_handle, LSA
}
done:
if (status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED)
if (status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED && !ctx_handle && !input)
{
ntlm_cleanup( ctx );
free( ctx );