diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/providers/krb5/krb5_utils.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/providers/krb5/krb5_utils.c b/src/providers/krb5/krb5_utils.c index 13ba9b5f..7a4d287a 100644 --- a/src/providers/krb5/krb5_utils.c +++ b/src/providers/krb5/krb5_utils.c @@ -750,12 +750,14 @@ check_cc_validity(const char *location, } ret = EOK; - *_valid = valid; - done: - if (ccache) krb5_cc_close(context, ccache); - krb5_free_context(context); - return ret; +done: + if (ret == EOK) { + *_valid = valid; + } + if (ccache) krb5_cc_close(context, ccache); + krb5_free_context(context); + return ret; } /*======== ccache back end utilities ========*/ |