[24491] in Kerberos

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

Re: Memory Leak problems with krb5_get_init_creds_password?

daemon@ATHENA.MIT.EDU (Sam Hartman)
Mon Aug 22 18:46:55 2005

To: brian.joh@comcast.net
From: Sam Hartman <hartmans@mit.edu>
Date: Mon, 22 Aug 2005 18:45:18 -0400
In-Reply-To: <1124418971.465304.314760@g14g2000cwa.googlegroups.com> (brian
 joh's message of "18 Aug 2005 19:36:11 -0700")
Message-ID: <tslek8lvbep.fsf@cz.mit.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: kerberos@mit.edu
Errors-To: kerberos-bounces@mit.edu

>>>>> "brian" == brian joh <brian.joh@comcast.net> writes:

    brian> Ken Raeburn wrote:

    >> We've run into other cases where a krb5_context is needed but
    >> other APIs make it difficult for one to be made available.  So
    >> there's code out there that allocates many short-lived
    >> krb5_context structures, often without using them for actual
    >> network stuff.

    brian> OK, thinking back, I can see how it might be difficult to
    brian> keep a krb5_context around in certain situations.

    brian> However, although I said the change I proposed would move
    brian> the "memory leak to krb5_init_context", this wasn't totally
    brian> accurate.  Basically, the memory leak would still occur
    brian> from the same place in the code (in the DNS SRV lookup code
    brian> apparently), but it would occur AT MOST once per
    brian> krb5_context.  Res_ninit() still gets called in exactly the
    brian> same spot, it just uses a PER krb5_context res_state
    brian> structure.  Then, res_ninit() apparently will deallocate
    brian> the structure, before initializing it again.

I'm not sure we have a desire to keep calling res_ninit multiple
times.

I think once per context might be acceptable actually.

this is my personal opinion though, not a decision on the issue.

________________________________________________
Kerberos mailing list           Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos

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