From 2a39855c79bb8b71d3e9dc39de854efe846c47be Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Tue, 30 Jun 1998 16:11:18 +0000 Subject: [PATCH] (get_cred_cache): try to do the right thing with default_client git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5052 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/kadm5/init_c.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/kadm5/init_c.c b/lib/kadm5/init_c.c index c53cc722d..d13d5a16b 100644 --- a/lib/kadm5/init_c.c +++ b/lib/kadm5/init_c.c @@ -228,7 +228,7 @@ get_cred_cache(krb5_context context, couldn't get principal from cache */ return -1; - if(client == default_client) { + if(client != default_client) { krb5_free_principal(context, default_client); default_client = NULL; } @@ -242,7 +242,8 @@ get_cred_cache(krb5_context context, if(ret == 0) { *ret_cache = id; krb5_free_principal(context, default_client); - krb5_free_principal(context, client); + if (default_client != client) + krb5_free_principal(context, client); return 0; } if(ccache != NULL)