From 05eb037395eac91e1dc2bdc8398d9d0fa44faba1 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Mon, 1 Nov 2010 20:36:22 +0000 Subject: [PATCH] pull up r24480 from trunk ------------------------------------------------------------------------ r24480 | ghudson | 2010-10-25 15:37:03 -0400 (Mon, 25 Oct 2010) | 8 lines ticket: 6793 target_version: 1.9 tags: pullup In acquire_init_cred in the GSS krb5 mech, don't intern cred->name, since it's not used as an output parameter. Fixes a memory leak. Reported by aberry@likewise.com. ticket: 6793 version_fixed: 1.9 status: resolved git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-9@24496 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/krb5/acquire_cred.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lib/gssapi/krb5/acquire_cred.c b/src/lib/gssapi/krb5/acquire_cred.c index a0bf5399e..8e222ff01 100644 --- a/src/lib/gssapi/krb5/acquire_cred.c +++ b/src/lib/gssapi/krb5/acquire_cred.c @@ -190,8 +190,7 @@ acquire_accept_cred(krb5_context context, krb5_kt_free_entry(context, &entry); assert(cred->name == NULL); - code = kg_init_name(context, desired_princ, NULL, - KG_INIT_NAME_INTERN, &cred->name); + code = kg_init_name(context, desired_princ, NULL, 0, &cred->name); if (code) { *minor_status = code; return GSS_S_FAILURE; @@ -384,8 +383,7 @@ acquire_init_cred(krb5_context context, */ if (cred->name == NULL) { if ((code = kg_init_name(context, ccache_princ, NULL, - KG_INIT_NAME_NO_COPY | KG_INIT_NAME_INTERN, - &cred->name))) { + KG_INIT_NAME_NO_COPY, &cred->name))) { krb5_free_principal(context, ccache_princ); krb5_cc_close(context, ccache); *minor_status = code; -- 2.26.2