summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2014-01-15 14:41:54 -0500
committerGreg Hudson <ghudson@mit.edu>2014-01-17 15:58:08 -0500
commit9df0c4bdce6b88a01af51e4bbb9a365db00256d5 (patch)
treeac8cfd2fbc61faedb6a914bf6ba5b04debb15596 /src/lib
parentef8e19af863158e4c1abc15fc710aa8cfad38406 (diff)
downloadkrb5-9df0c4bdce6b88a01af51e4bbb9a365db00256d5.tar.gz
krb5-9df0c4bdce6b88a01af51e4bbb9a365db00256d5.tar.xz
krb5-9df0c4bdce6b88a01af51e4bbb9a365db00256d5.zip
Clean up rcache if GSS krb5 acquire_cred fails
The error handler in acquire_cred_context didn't release the rcache, which would cause it to leak if we failed after acquire_accept_cred. ticket: 7818 (new) target_version: 1.12.2 tags: pullup
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/gssapi/krb5/acquire_cred.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/gssapi/krb5/acquire_cred.c b/src/lib/gssapi/krb5/acquire_cred.c
index 37cc6b5c56..f625c0c136 100644
--- a/src/lib/gssapi/krb5/acquire_cred.c
+++ b/src/lib/gssapi/krb5/acquire_cred.c
@@ -829,6 +829,8 @@ error_out:
if (cred->keytab)
krb5_kt_close(context, cred->keytab);
#endif /* LEAN_CLIENT */
+ if (cred->rcache)
+ krb5_rc_close(context, cred->rcache);
if (cred->name)
kg_release_name(context, &cred->name);
k5_mutex_destroy(&cred->lock);