diff options
Diffstat (limited to 'src/lib/gssapi/spnego')
-rw-r--r-- | src/lib/gssapi/spnego/spnego_mech.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/gssapi/spnego/spnego_mech.c b/src/lib/gssapi/spnego/spnego_mech.c index e3e029f..073d7fc 100644 --- a/src/lib/gssapi/spnego/spnego_mech.c +++ b/src/lib/gssapi/spnego/spnego_mech.c @@ -2074,14 +2074,18 @@ spnego_gss_delete_sec_context( spnego_gss_ctx_id_t *ctx = (spnego_gss_ctx_id_t *)context_handle; + *minor_status = 0; + if (context_handle == NULL) return (GSS_S_FAILURE); + if (*ctx == NULL) + return (GSS_S_COMPLETE); + /* * If this is still an SPNEGO mech, release it locally. */ - if (*ctx != NULL && - (*ctx)->magic_num == SPNEGO_MAGIC_ID) { + if ((*ctx)->magic_num == SPNEGO_MAGIC_ID) { (void) gss_delete_sec_context(minor_status, &(*ctx)->ctx_handle, output_token); |