[Date Prev][Date Next] [Chronological] [Thread] [Top]


I ran a malloc debugger on a program similar to Sam's; it appears to be
leaking in ldap_create(), specifically libraries/libldap/open.c:153 where
the SASL stuff is LDAP_STRDUP()'d.

I haven't had a good look through the OpenLDAP source, but I think I've got
a decent fix for simple binds at
http://horde.net/~jwm/openldap-unbind.patch. I'd like to thank Armin Biere
at ETHZ for his ccmalloc memory debugger; it was a great help in tracking
this down. www.inf.ethz.ch/personal/biere/projects/ccmalloc/

Lastly, I'd like to note that this is by no means the only place that will
leak in this manner. There are at least a couple instances of comments
stating "this value is leaked" in libraries/libldap/init.c, and might be
more in other places where there's SASL code. Someone with a vested interest
in the SASL code should give it a good going-over for more leaks like this.