From: Ezra Peisach Date: Wed, 4 Oct 2000 18:09:59 +0000 (+0000) Subject: * rd_req_dec.c (krb5_rd_req_decrypt_tkt_part): Fix memory leak if X-Git-Tag: krb5-1.3-alpha1~1859 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c7f5c91a3c8c1f1c8d81d6142a31f15beaf1197e;p=krb5.git * rd_req_dec.c (krb5_rd_req_decrypt_tkt_part): Fix memory leak if krb5_decrypt_tkt_part() fails. (krb5-libs/855) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12720 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index 62d67fea0..4221c736a 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,3 +1,8 @@ +2000-10-04 Ezra Peisach + + * rd_req_dec.c (krb5_rd_req_decrypt_tkt_part): Fix memory leak if + krb5_decrypt_tkt_part() fails. (krb5-libs/855) + 2000-10-03 Ezra Peisach * copy_addrs.c (krb5_copy_addresses): Cleanup unsigned vs signed diff --git a/src/lib/krb5/krb/rd_req_dec.c b/src/lib/krb5/krb/rd_req_dec.c index 442e78b2d..4a799fc65 100644 --- a/src/lib/krb5/krb/rd_req_dec.c +++ b/src/lib/krb5/krb/rd_req_dec.c @@ -83,8 +83,8 @@ krb5_rd_req_decrypt_tkt_part(context, req, keytab) enctype, &ktent))) return retval; - if ((retval = krb5_decrypt_tkt_part(context, &ktent.key, req->ticket))) - return retval; + retval = krb5_decrypt_tkt_part(context, &ktent.key, req->ticket); + /* If error, we will return after freeing memory */ (void) krb5_kt_free_entry(context, &ktent); return retval;