[27937] in Kerberos
Re: Question about freeing memory when using krb5_get_credentials
daemon@ATHENA.MIT.EDU (Tom Yu)
Thu Jun 14 18:29:07 2007
To: "Markus Moeller" <huaraz@moeller.plus.com>
From: Tom Yu <tlyu@mit.edu>
Date: Thu, 14 Jun 2007 18:28:36 -0400
In-Reply-To: <f4kdfl$sf3$1@sea.gmane.org> (Markus Moeller's message of "Mon,
11 Jun 2007 22:05:47 +0100")
Message-ID: <ldv1wge2msr.fsf@cathode-dark-space.mit.edu>
MIME-Version: 1.0
Cc: kerberos@mit.edu
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: kerberos-bounces@mit.edu
>>>>> "Markus" == Markus Moeller <huaraz@moeller.plus.com> writes:
Markus> My capath looks like:
Markus> [capaths]
Markus> SUSE.HOME = {
Markus> XEN.HOME = WINDOWS2003.HOME
Markus> WINDOWS2003.HOME = .
Markus> }
Markus> XEN.HOME = {
Markus> SUSE.HOME = WINDOWS2003.HOME
Markus> }
Markus> WINDOWS2003.HOME = {
Markus> SUSE.HOME = .
Markus> }
I assume that you are attempting to authenticate between two realms
which are listed in your capaths as directly connected. Please try
the following patch and let me know if it stops the leak. Basically
it looks like a pointer is getting overwritten and thereby leaking a
string allocated by the profile library.
=== src/lib/krb5/krb/walk_rtree.c
==================================================================
--- src/lib/krb5/krb/walk_rtree.c (revision 20062)
+++ src/lib/krb5/krb/walk_rtree.c (local)
@@ -167,6 +167,9 @@
links++;
}
}
+ if (cap_nodes[links] != NULL)
+ krb5_xfree(cap_nodes[links]);
+
cap_nodes[links] = cap_server; /* put server on end of list */
/* this simplifies the code later and make */
/* cleanup eaiser as well */
________________________________________________
Kerberos mailing list Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos