svn rev #22300: trunk/src/lib/krb5/krb/
ghudson@MIT.EDU
ghudson at MIT.EDU
Fri May 1 16:07:14 EDT 2009
http://src.mit.edu/fisheye/changelog/krb5/?cs=22300
Commit By: ghudson
Log Message:
Move an error check to an earlier location in krb5_524_conv_principal
to fix a memory leak.
Changed Files:
U trunk/src/lib/krb5/krb/conv_princ.c
Modified: trunk/src/lib/krb5/krb/conv_princ.c
===================================================================
--- trunk/src/lib/krb5/krb/conv_princ.c 2009-04-30 20:48:36 UTC (rev 22299)
+++ trunk/src/lib/krb5/krb/conv_princ.c 2009-05-01 20:07:13 UTC (rev 22300)
@@ -156,6 +156,9 @@
unsigned int tmp_realm_len;
int retval;
+ if (context->profile == 0)
+ return KRB5_CONFIG_CANTOPEN;
+
*name = *inst = '\0';
switch (krb5_princ_size(context, princ)) {
case 2:
@@ -218,8 +221,6 @@
/* Ask for v4_realm corresponding to
krb5 principal realm from krb5.conf realms stanza */
- if (context->profile == 0)
- return KRB5_CONFIG_CANTOPEN;
retval = profile_get_string(context->profile, KRB5_CONF_REALMS,
tmp_prealm, KRB5_CONF_V4_REALM, 0,
&tmp_realm);
More information about the cvs-krb5
mailing list