From: Tom Yu Date: Tue, 26 Jan 2010 18:43:29 +0000 (+0000) Subject: Apply patch from Arlene Berry to plug a memory leak X-Git-Tag: krb5-1.9-beta1~373 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4388630183fdc42b05958fa67fa26a80ffe0f2a5;p=krb5.git Apply patch from Arlene Berry to plug a memory leak ticket: 6599 target_version: 1.8 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23672 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 76ecd1583..21728a527 100644 --- a/src/lib/krb5/krb/rd_req_dec.c +++ b/src/lib/krb5/krb/rd_req_dec.c @@ -114,8 +114,10 @@ rd_req_decrypt_tkt_part(krb5_context context, const krb5_ap_req *req, while ((code = krb5_kt_next_entry(context, keytab, &ktent, &cursor)) == 0) { - if (ktent.key.enctype != req->ticket->enc_part.enctype) + if (ktent.key.enctype != req->ticket->enc_part.enctype) { + (void) krb5_free_keytab_entry_contents(context, &ktent); continue; + } retval = krb5_decrypt_tkt_part(context, &ktent.key, req->ticket);