diff --git a/libcli/auth/netlogon_creds_cli.c b/libcli/auth/netlogon_creds_cli.c index 50a5f50a57d..c5a100c3c0e 100644 --- a/libcli/auth/netlogon_creds_cli.c +++ b/libcli/auth/netlogon_creds_cli.c @@ -2622,7 +2622,7 @@ static void netlogon_creds_cli_LogonSamLogon_done(struct tevent_req *subreq) status = netlogon_creds_decrypt_samlogon_validation(&state->tmp_creds, state->validation_level, state->validation); - if (tevent_req_nterror(req, result)) { + if (tevent_req_nterror(req, status)) { netlogon_creds_cli_LogonSamLogon_cleanup(req, result); return; }