summaryrefslogtreecommitdiffstats
path: root/src/lib/gssapi
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2006-11-16 01:14:14 +0000
committerKen Raeburn <raeburn@mit.edu>2006-11-16 01:14:14 +0000
commitdd4511f8b92d699a9252f120ce64fc827470de48 (patch)
tree2f0634faedbfce5603215f22ee59eb8f8ed3fc35 /src/lib/gssapi
parentb398645d8d98166eaae2461b25ad9023fb8b5433 (diff)
downloadkrb5-dd4511f8b92d699a9252f120ce64fc827470de48.tar.gz
krb5-dd4511f8b92d699a9252f120ce64fc827470de48.tar.xz
krb5-dd4511f8b92d699a9252f120ce64fc827470de48.zip
avoid double frees in ccache manipulation around gen_new
* krb5/krb/vfy_increds.c (krb5_verify_init_creds): If krb5_cc_gen_new fails, don't both close and destroy the template ccache. * gssapi/krb5/accept_sec_context.c (rd_and_store_for_creds): Likewise. ticket: new target_version: 1.6 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18815 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/gssapi')
-rw-r--r--src/lib/gssapi/krb5/accept_sec_context.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/gssapi/krb5/accept_sec_context.c b/src/lib/gssapi/krb5/accept_sec_context.c
index ed4c3e221..618b012f9 100644
--- a/src/lib/gssapi/krb5/accept_sec_context.c
+++ b/src/lib/gssapi/krb5/accept_sec_context.c
@@ -141,8 +141,10 @@ rd_and_store_for_creds(context, auth_context, inbuf, out_cred)
goto cleanup;
ccache = template_ccache; /* krb5_cc_gen_new will replace so make a copy */
- if ((retval = krb5_cc_gen_new(context, &ccache)))
+ if ((retval = krb5_cc_gen_new(context, &ccache))) {
+ ccache = NULL;
goto cleanup;
+ }
if ((retval = krb5_cc_initialize(context, ccache, creds[0]->client)))
goto cleanup;