diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ZMkAuth.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/ZMkAuth.c b/lib/ZMkAuth.c index 6e8984d..0a39487 100644 --- a/lib/ZMkAuth.c +++ b/lib/ZMkAuth.c @@ -229,13 +229,9 @@ ZGetCredsRealm(krb5_creds **creds_out, } result = krb5_cc_get_principal(Z_krb5_ctx, ccache, &creds_in.client); - if (result) { - krb5_free_cred_contents(Z_krb5_ctx, &creds_in); /* I also hope this is ok */ - krb5_cc_close(Z_krb5_ctx, ccache); - return result; - } + if (!result) + result = krb5_get_credentials(Z_krb5_ctx, 0, ccache, &creds_in, creds_out); - result = krb5_get_credentials(Z_krb5_ctx, 0, ccache, &creds_in, creds_out); krb5_cc_close(Z_krb5_ctx, ccache); krb5_free_cred_contents(Z_krb5_ctx, &creds_in); /* I also hope this is ok */ |