svn rev #22190: trunk/src/lib/krb5/krb/
ghudson@MIT.EDU
ghudson at MIT.EDU
Fri Apr 10 15:51:53 EDT 2009
http://src.mit.edu/fisheye/changelog/krb5/?cs=22190
Commit By: ghudson
Log Message:
Check the return value of krb5_timeofday in krb5int_populate_gic_opt.
Also initialize krb5int_populate_gic_opt's output variable.
Changed Files:
U trunk/src/lib/krb5/krb/gic_pwd.c
Modified: trunk/src/lib/krb5/krb/gic_pwd.c
===================================================================
--- trunk/src/lib/krb5/krb/gic_pwd.c 2009-04-10 19:50:55 UTC (rev 22189)
+++ trunk/src/lib/krb5/krb/gic_pwd.c 2009-04-10 19:51:53 UTC (rev 22190)
@@ -416,6 +416,7 @@
krb5_get_init_creds_opt *opt;
krb5_error_code retval;
+ *opte = NULL;
retval = krb5_get_init_creds_opt_alloc(context, &opt);
if (retval)
return(retval);
@@ -439,12 +440,17 @@
krb5_get_init_creds_opt_set_proxiable(opt, 1);
else krb5_get_init_creds_opt_set_proxiable(opt, 0);
if (creds && creds->times.endtime) {
- krb5_timeofday(context, &starttime);
+ retval = krb5_timeofday(context, &starttime);
+ if (retval)
+ goto cleanup;
if (creds->times.starttime) starttime = creds->times.starttime;
krb5_get_init_creds_opt_set_tkt_life(opt, creds->times.endtime - starttime);
}
return krb5int_gic_opt_to_opte(context, opt, opte, 0,
"krb5int_populate_gic_opt");
+cleanup:
+ krb5_get_init_creds_opt_free(context, opt);
+ return retval;
}
/*
More information about the cvs-krb5
mailing list