svn rev #23926: trunk/src/lib/gssapi/krb5/
ghudson@MIT.EDU
ghudson at MIT.EDU
Thu Apr 22 16:07:08 EDT 2010
http://src.mit.edu/fisheye/changelog/krb5/?cs=23926
Commit By: ghudson
Log Message:
In kg_new_connection(), make sure k_cred is freed in all failure
cases.
Changed Files:
U trunk/src/lib/gssapi/krb5/init_sec_context.c
Modified: trunk/src/lib/gssapi/krb5/init_sec_context.c
===================================================================
--- trunk/src/lib/gssapi/krb5/init_sec_context.c 2010-04-22 20:04:01 UTC (rev 23925)
+++ trunk/src/lib/gssapi/krb5/init_sec_context.c 2010-04-22 20:07:08 UTC (rev 23926)
@@ -483,7 +483,7 @@
{
OM_uint32 major_status;
krb5_error_code code;
- krb5_creds *k_cred;
+ krb5_creds *k_cred = NULL;
krb5_gss_ctx_id_rec *ctx, *ctx_free;
krb5_timestamp now;
gss_buffer_desc token;
@@ -618,8 +618,6 @@
goto fail;
}
- krb5_free_creds(context, k_cred);
- k_cred = NULL;
ctx->enc = NULL;
ctx->seq = NULL;
ctx->have_acceptor_subkey = 0;
@@ -672,6 +670,7 @@
}
fail:
+ krb5_free_creds(context, k_cred);
if (ctx_free) {
if (ctx_free->auth_context)
krb5_auth_con_free(context, ctx_free->auth_context);
More information about the cvs-krb5
mailing list