From 28084c1538bbe7a3990870ccd175921fc17fe8c7 Mon Sep 17 00:00:00 2001 From: John Kohl Date: Fri, 8 Mar 1991 16:42:51 +0000 Subject: [PATCH] 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 --- src/lib/krb5/krb/rd_req_dec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 */ -- 2.26.2