From: Tom Yu Date: Tue, 23 Mar 2010 22:31:00 +0000 (+0000) Subject: pull up r23834 from trunk X-Git-Tag: krb5-1.8.1-beta1~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f5cbaf9e5a3d3ee2e7a38159510ce9c8ed06af64;p=krb5.git pull up r23834 from trunk ------------------------------------------------------------------------ r23834 | tlyu | 2010-03-23 15:00:13 -0700 (Tue, 23 Mar 2010) | 7 lines ticket: 6678 target_version: 1.8.1 tags: pullup Apply patch from Arlene Berry to not use freed memory in gss_import_sec_context in some error paths. ticket: 6678 version_fixed: 1.8.1 status: resolved git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-8@23835 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/gssapi/krb5/import_sec_context.c b/src/lib/gssapi/krb5/import_sec_context.c index d4ef1e345..30ec2309e 100644 --- a/src/lib/gssapi/krb5/import_sec_context.c +++ b/src/lib/gssapi/krb5/import_sec_context.c @@ -106,12 +106,13 @@ krb5_gss_import_sec_context(minor_status, interprocess_token, context_handle) ibp = (krb5_octet *) interprocess_token->value; blen = (size_t) interprocess_token->length; kret = kg_ctx_internalize(context, (krb5_pointer *) &ctx, &ibp, &blen); - krb5_free_context(context); if (kret) { *minor_status = (OM_uint32) kret; save_error_info(*minor_status, context); + krb5_free_context(context); return(GSS_S_FAILURE); } + krb5_free_context(context); /* intern the context handle */ if (! kg_save_ctx_id((gss_ctx_id_t) ctx)) {