From 318f8606d16fb2a904d279b89164ff58a1423dba Mon Sep 17 00:00:00 2001 From: Alexandra Ellwood Date: Thu, 9 Oct 2008 02:11:51 +0000 Subject: [PATCH] Crash in kim_credential_create_from_keytab Was dereferencing NULL freeing creds. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20849 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kim/lib/kim_credential.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kim/lib/kim_credential.c b/src/kim/lib/kim_credential.c index ec739f98a..b4d15ab81 100644 --- a/src/kim/lib/kim_credential.c +++ b/src/kim/lib/kim_credential.c @@ -556,6 +556,7 @@ kim_error kim_credential_create_from_keytab (kim_credential *out_credential, } if (principal ) { krb5_free_principal (credential->context, principal); } + if (free_creds) { krb5_free_cred_contents (credential->context, &creds); } if (!err) { *out_credential = credential; @@ -563,7 +564,6 @@ kim_error kim_credential_create_from_keytab (kim_credential *out_credential, } if (options != in_options) { kim_options_free (&options); } - if (free_creds) { krb5_free_cred_contents (credential->context, &creds); } kim_credential_free (&credential); return check_error (err); -- 2.26.2