From: Theodore Tso Date: Sat, 30 Oct 1993 22:53:14 +0000 (+0000) Subject: Change so that mk_req_ext won't accidentally free caller's client and X-Git-Tag: krb5-1.0-beta3~176 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=af7f81c53852af9de4fa548bc729e75179fe91cb;p=krb5.git 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 --- 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); \