[2942] in Kerberos

home help back first fref pref prev next nref lref last post

Re: Memory leaks and problem areas....

daemon@ATHENA.MIT.EDU (Theodore Ts'o)
Wed Dec 22 16:59:26 1993

Date: Wed, 22 Dec 93 16:36:38 EST
From: tytso@MIT.EDU (Theodore Ts'o)
To: Jim_Miller@bilbo.suite.com
Cc: gmachin@somnet.sandia.gov, kerberos@MIT.EDU
Cc: rosenthl@mcc.com, gordon@teflon.ftp.com
In-Reply-To: Jim Miller's message of Tue, 21 Dec 93 19:05:59 -0600,

   From: jim@bilbo.suite.com (Jim Miller)
   Date: Tue, 21 Dec 93 19:05:59 -0600

   It appears that "krb5_get_cred_from_kdc" was written with the assumption  
   that "cred->server" gets replaced without the previous value being freed  
   <arg!>.

   Should "krb5_get_cred_via_tgt" replace "creds->server", or is it correct  
   to leave it as it is?

   I don't know.  Maybe somebody at MIT knows the answer...<hint>

Congradulations; you've just successfully made the Beta 3 release date
slip.  :-)

The answer is that any time a routine hands a <structure with pointers to
allocated memory> to a function call which can mutate that structure,
the original routine has to assume that some of the allocated memory in
that structure can be freed and reallocated.  Hence, it should not keep
aliased pointers to that memory, lest it be freed out from under it.

Unfortunately, a number of library routines currently do not obey this
memory discipline, and I'm going to have to all the places which call
these routines to make sure they do the right thing as well.  Otherwise,
there are potential cases of both memory leaks and references to freed
memory.  Because this may have ramifications all over the Kerberos
source tree, and since I won't be able to fix it all before the end of
the year, I'm going to slip the Beta-3 release until mid-January.

I am still tentatively planning the next release after Beta-3 to be in
April, to coincide with the X11R6 release.

							- Ted


home help back first fref pref prev next nref lref last post