summaryrefslogtreecommitdiffstats
path: root/krb5-master-rcache-acquirecred-leak.patch
diff options
context:
space:
mode:
Diffstat (limited to 'krb5-master-rcache-acquirecred-leak.patch')
-rw-r--r--krb5-master-rcache-acquirecred-leak.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/krb5-master-rcache-acquirecred-leak.patch b/krb5-master-rcache-acquirecred-leak.patch
new file mode 100644
index 0000000..0ae7b34
--- /dev/null
+++ b/krb5-master-rcache-acquirecred-leak.patch
@@ -0,0 +1,26 @@
+commit 9df0c4bdce6b88a01af51e4bbb9a365db00256d5
+Author: Greg Hudson <ghudson@mit.edu>
+Date: Wed Jan 15 14:41:54 2014 -0500
+
+ 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
+
+diff --git a/src/lib/gssapi/krb5/acquire_cred.c b/src/lib/gssapi/krb5/acquire_cred.c
+index 37cc6b5..f625c0c 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);