svn rev #24020: trunk/src/lib/krb5/krb/
ghudson@MIT.EDU
ghudson at MIT.EDU
Thu May 13 14:49:20 EDT 2010
http://src.mit.edu/fisheye/changelog/krb5/?cs=24020
Commit By: ghudson
Log Message:
ticket: 6722
subject: Error handling bug in krb5_init_creds_init()
tags: pullup
target_version: 1.8.2
Fix a bug in krb5_init_creds_init() where a freed context could be
returned to the caller in certain error cases.
Changed Files:
U trunk/src/lib/krb5/krb/get_in_tkt.c
Modified: trunk/src/lib/krb5/krb/get_in_tkt.c
===================================================================
--- trunk/src/lib/krb5/krb/get_in_tkt.c 2010-05-13 17:48:54 UTC (rev 24019)
+++ trunk/src/lib/krb5/krb/get_in_tkt.c 2010-05-13 18:49:20 UTC (rev 24020)
@@ -965,14 +965,15 @@
krb5_princ_type(context, ctx->request->client) = KRB5_NT_WELLKNOWN;
}
code = restart_init_creds_loop(context, ctx, NULL);
+ if (code)
+ goto cleanup;
*pctx = ctx;
+ ctx = NULL;
cleanup:
- if (code != 0)
- krb5_init_creds_free(context, ctx);
- if (str != NULL)
- free(str);
+ krb5_init_creds_free(context, ctx);
+ free(str);
return code;
}
More information about the cvs-krb5
mailing list