Change so that mk_req_ext won't accidentally free caller's client and
authorTheodore Tso <tytso@mit.edu>
Sat, 30 Oct 1993 22:53:14 +0000 (22:53 +0000)
committerTheodore Tso <tytso@mit.edu>
Sat, 30 Oct 1993 22:53:14 +0000 (22:53 +0000)
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

index 1595a8fa3a24d8138146d5231e5e85ea43dc4506..ecbc895ae77ddbcd18f143b7e835c36483a3a3c7 100644 (file)
@@ -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); \