s4-auth: unconditionally set previous_ev
authorAndrew Tridgell <tridge@samba.org>
Thu, 4 Nov 2010 01:52:08 +0000 (12:52 +1100)
committerAndrew Tridgell <tridge@samba.org>
Thu, 4 Nov 2010 09:35:43 +0000 (20:35 +1100)
we need the caller to know when the previous_ev was NULL

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

source4/auth/kerberos/krb5_init_context.c

index 54f27b0860d7b9e270082e985983fa82d3ecadd6..2f1416d3fe7a420e25a37ff393e1c4bb3f2df0fc 100644 (file)
@@ -527,9 +527,7 @@ krb5_error_code smb_krb5_context_set_event_ctx(struct smb_krb5_context *smb_krb5
                return EINVAL;
        }
 
-       if (smb_krb5_context->current_ev) {
-               *previous_ev = smb_krb5_context->current_ev;
-       }
+       *previous_ev = smb_krb5_context->current_ev;
 
        smb_krb5_context->current_ev = talloc_reference(smb_krb5_context, ev);
        if (!smb_krb5_context->current_ev) {