summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1993-10-30 22:53:14 +0000
committerTheodore Tso <tytso@mit.edu>1993-10-30 22:53:14 +0000
commitaf7f81c53852af9de4fa548bc729e75179fe91cb (patch)
tree516e328d3a430cfdb865890a5067ce274fc45e5d /src
parentcec086158fca15311cdf46658b66adc8bb4160c4 (diff)
downloadkrb5-af7f81c53852af9de4fa548bc729e75179fe91cb.tar.gz
krb5-af7f81c53852af9de4fa548bc729e75179fe91cb.tar.xz
krb5-af7f81c53852af9de4fa548bc729e75179fe91cb.zip
Change so that mk_req_ext won't accidentally free caller's client and
checksum arguments. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2714 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/lib/krb5/krb/mk_req_ext.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/lib/krb5/krb/mk_req_ext.c b/src/lib/krb5/krb/mk_req_ext.c
index 1595a8fa3..ecbc895ae 100644
--- a/src/lib/krb5/krb/mk_req_ext.c
+++ b/src/lib/krb5/krb/mk_req_ext.c
@@ -141,15 +141,14 @@ krb5_data *outbuf;
return(retval);
}
- if (authentp) {
+ /* Null out these fields, to prevent pointer sharing problems;
+ * they were supplied by the caller
+ */
+ authent.client = NULL;
+ authent.checksum = NULL;
+ if (authentp)
*authentp = authent;
- /* Null out these fields, to prevent pointer sharing problems
- * The caller won't need these fields anyway, since they were
- * supplied by the caller
- */
- authentp->client = NULL;
- authentp->checksum = NULL;
- } else
+ else
krb5_free_authenticator_contents(&authent);
#define cleanup_scratch() { (void) memset(scratch->data, 0, scratch->length); \