From: John Kohl Date: Fri, 8 Mar 1991 16:42:51 +0000 (+0000) Subject: clean out tktauthent before using, so we can free it without worrying X-Git-Tag: krb5-1.0-alpha4~98 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=28084c1538bbe7a3990870ccd175921fc17fe8c7;p=krb5.git clean out tktauthent before using, so we can free it without worrying git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1874 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/krb/rd_req_dec.c b/src/lib/krb5/krb/rd_req_dec.c index 9bd5a5a4b..a1f25b553 100644 --- a/src/lib/krb5/krb/rd_req_dec.c +++ b/src/lib/krb5/krb/rd_req_dec.c @@ -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 */