summaryrefslogtreecommitdiffstats
path: root/src/lib/krb5/krb
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/krb5/krb')
-rw-r--r--src/lib/krb5/krb/ChangeLog8
-rw-r--r--src/lib/krb5/krb/sendauth.c5
2 files changed, 11 insertions, 2 deletions
diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog
index 81d680598..b5d517def 100644
--- a/src/lib/krb5/krb/ChangeLog
+++ b/src/lib/krb5/krb/ChangeLog
@@ -1,3 +1,11 @@
+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
diff --git a/src/lib/krb5/krb/sendauth.c b/src/lib/krb5/krb/sendauth.c
index 348094c7c..343611830 100644
--- a/src/lib/krb5/krb/sendauth.c
+++ b/src/lib/krb5/krb/sendauth.c
@@ -213,12 +213,13 @@ krb5_sendauth(context, auth_context,
}
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);