destined to be returned to avoid freeing it. Also,
unconditionally free credspout if it's non-NULL so that if someone
doesn't pass in a ticket and doesn't give us a non-NULL out_creds,
we don't leak it. [krb5-libs/699]
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11249
dc483132-0cff-0310-8789-
dd5450dbe970
+Mon Mar 8 22:39:01 1999 Tom Yu <tlyu@mit.edu>
+
+ * sendauth.c (krb5_sendauth): Set credspout to NULL if it's
+ destined to be returned to avoid freeing it. Also,
+ unconditionally free credspout if it's non-NULL so that if someone
+ doesn't pass in a ticket and doesn't give us a non-NULL out_creds,
+ we don't leak it. [krb5-libs/699]
+
1998-11-13 Theodore Ts'o <tytso@rsts-11.mit.edu>
* Makefile.in: Set the myfulldir and mydir variables (which are
}
retval = 0; /* Normal return */
if (out_creds) {
- *out_creds = credsp;
+ *out_creds = credsp;
+ credspout = NULL;
}
error_return:
krb5_free_cred_contents(context, &creds);
- if (!out_creds && credspout)
+ if (credspout != NULL)
krb5_free_creds(context, credspout);
if (!ccache && use_ccache)
krb5_cc_close(context, use_ccache);