clean out tktauthent before using, so we can free it without worrying
authorJohn Kohl <jtkohl@mit.edu>
Fri, 8 Mar 1991 16:42:51 +0000 (16:42 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Fri, 8 Mar 1991 16:42:51 +0000 (16:42 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1874 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/rd_req_dec.c

index 9bd5a5a4b57131ea99fcb1ff7f6dd79f55ea3062..a1f25b553d1da9baa72d0fb8acb0ae95784f69f0 100644 (file)
@@ -127,11 +127,13 @@ krb5_tkt_authent **authdat;
      * we ever have an error, we're responsible for freeing it.
      */
     if (!(tktauthent =
-         (krb5_tkt_authent *) malloc(sizeof(krb5_tkt_authent)))) {
+         (krb5_tkt_authent *) malloc(sizeof(*tktauthent)))) {
            retval = ENOMEM;
            goto cleanup;
     }
     
+    memset((char *)tktauthent, 0, sizeof(*tktauthent));
+
     if (retval = decrypt_authenticator(req, &tktauthent->authenticator))
        goto cleanup;
     *authdat = NULL;           /* Set authdat to tktauthent when we finish */