(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
This commit is contained in:
Assar Westerlund
1998-06-30 16:11:18 +00:00
parent 75cda86e24
commit 2a39855c79

View File

@@ -228,7 +228,7 @@ get_cred_cache(krb5_context context,
couldn't get principal from cache */ couldn't get principal from cache */
return -1; return -1;
if(client == default_client) { if(client != default_client) {
krb5_free_principal(context, default_client); krb5_free_principal(context, default_client);
default_client = NULL; default_client = NULL;
} }
@@ -242,6 +242,7 @@ get_cred_cache(krb5_context context,
if(ret == 0) { if(ret == 0) {
*ret_cache = id; *ret_cache = id;
krb5_free_principal(context, default_client); krb5_free_principal(context, default_client);
if (default_client != client)
krb5_free_principal(context, client); krb5_free_principal(context, client);
return 0; return 0;
} }