From af7f81c53852af9de4fa548bc729e75179fe91cb Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Sat, 30 Oct 1993 22:53:14 +0000 Subject: [PATCH] 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 --- src/lib/krb5/krb/mk_req_ext.c | 15 +++++++-------- 1 file 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); \ -- 2.26.2