From 8647bcedc38882da7ea1c22c973faedc0b571ceb Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Fri, 11 Mar 2011 17:53:18 +0000 Subject: [PATCH] Although it can't actually happen, make it more explicit that we won't dereference a null mech in the cleanup handler of the mechglue's gss_accept_sec_context. ticket: 6813 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24701 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/mechglue/g_accept_sec_context.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/gssapi/mechglue/g_accept_sec_context.c b/src/lib/gssapi/mechglue/g_accept_sec_context.c index cf21c1513..8714f3fb7 100644 --- a/src/lib/gssapi/mechglue/g_accept_sec_context.c +++ b/src/lib/gssapi/mechglue/g_accept_sec_context.c @@ -353,7 +353,8 @@ error_out: free(union_ctx_id->mech_type->elements); free(union_ctx_id->mech_type); } - if (union_ctx_id->internal_ctx_id && mech->gss_delete_sec_context) { + if (union_ctx_id->internal_ctx_id && mech && + mech->gss_delete_sec_context) { mech->gss_delete_sec_context(&temp_minor_status, &union_ctx_id->internal_ctx_id, GSS_C_NO_BUFFER); -- 2.26.2