r15491: Always initialise is_cfx (found by Valgrind)
authorAndrew Bartlett <abartlet@samba.org>
Sun, 7 May 2006 15:02:27 +0000 (15:02 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:05:41 +0000 (14:05 -0500)
Always remember to free the crypto context (found by Luke Howard)
(This used to be commit 4b44355d42592f4acaae459c6ae09dd928f083b7)

source4/heimdal/lib/gssapi/accept_sec_context.c

index afca449c5c15db8755c92eeae389e0cf4063f003..50d150e57c6f3fe97d0dbb7d424eb7a9364182d8 100644 (file)
@@ -77,6 +77,7 @@ gsskrb5_is_cfx(gss_ctx_id_t context_handle, int *is_cfx)
 {
     krb5_keyblock *key;
     int acceptor = (context_handle->more_flags & LOCAL) == 0;
+    *is_cfx = 0;
 
     if (acceptor) {
        if (context_handle->auth_context->local_subkey)
@@ -403,9 +404,10 @@ gsskrb5_acceptor_start
                                        crypto, KRB5_KU_AP_REQ_AUTH_CKSUM, NULL, 0,
                                        authenticator->cksum);
            krb5_free_authenticator(gssapi_krb5_context, &authenticator);
+           krb5_crypto_destroy(gssapi_krb5_context, crypto);
 
            if(kret) {
-               ret = GSS_S_FAILURE;
+               ret = GSS_S_BAD_SIG;
                *minor_status = kret;
                gssapi_krb5_set_error_string ();
                return ret;