trying to dereference it, in case lower-level routine failed to assign
a value to it.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11619
dc483132-0cff-0310-8789-
dd5450dbe970
+1999-08-03 Danilo Almeida <dalmeida@mit.edu>
+
+ * get_creds.c (krb5_validate_or_renew_creds): Intialize out_creds
+ pointer to 0 and then check whether it is 0 before trying to
+ dereference it, in case lower-level routine failed to assign
+ a value to it.
+
1999-07-22 Jeffrey Altman <jaltman@columbia.edu>
get_in_tkt.c: rename conf_boolean to krb5_conf_boolean so that
{
krb5_error_code ret;
krb5_creds in_creds; /* only client and server need to be filled in */
- krb5_creds *out_creds;
+ krb5_creds *out_creds = 0; /* for check before dereferencing below */
krb5_creds **tgts;
memset((char *)&in_creds, 0, sizeof(krb5_creds));
&in_creds, &out_creds, &tgts);
/* ick. copy the struct contents, free the container */
-
- *creds = *out_creds;
- krb5_xfree(out_creds);
+ if (out_creds) {
+ *creds = *out_creds;
+ krb5_xfree(out_creds);
+ }
cleanup: