Question about freeing memory when using krb5_get_credentials
Tom Yu
tlyu at MIT.EDU
Thu Jun 14 18:28:36 EDT 2007
>>>>> "Markus" == Markus Moeller <huaraz at 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 */
More information about the Kerberos
mailing list