[748] in Kerberos-V5-bugs
Re: Memory leak in KDC
daemon@ATHENA.MIT.EDU (Theodore Ts'o)
Wed Sep 14 22:15:35 1994
Date: Wed, 14 Sep 1994 22:15:20 +0500
From: Theodore Ts'o <tytso@MIT.EDU>
To: "Jonathan I. Kamens" <jik@cam.ov.com>
Cc: krb5-bugs@MIT.EDU
In-Reply-To: [724]
Date: Thu, 8 Sep 1994 16:07:59 -0400
From: "Jonathan I. Kamens" <jik@cam.ov.com>
The function kdc_process_tgs_req in kdc_util.c in the KDC doesn't free
the authdat returned by krb5_rd_req_decoded if it succeeds and there's
an error later.
It's actually not a problem. The authdat is returned to the caller,
even if there is an error --- the reason so that the caller can extract
out the client name to print an intelligeble log message. The caller is
written to always free *ret_authdat all the time, so the there isn't a
memory leak.
In fact, your (untested) patch should cause memory to be freed twice,
which is a bad thing....
- Ted