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

Re: Fix for Memory Leak (ITS#217)

At 10:38 PM 6/30/99 GMT, tim@cmark.com wrote:
>Full_Name: Tim Bowman
>Version: 1.2.3
>OS: Linux & NT
>URL: ftp://ftp.openldap.org/incoming/
>Submission from: (NULL) (
>There is a memory leak due to the global openldap_ldap_global_options struct
>(in init.c) having two members ldo_defbase & ldo_defhost which are malloced if
>an ldap.conf file is read.  This is a one-time allocation, so it's only a big
>for OSs that don't free the memory.

The simple (and correct) fix is for the library to register an atexit()
handler to deallocate the two strings...

> ldap needs an ldap_uninit to pair with ldap_init.

ldap_init/ldap_open are paired with ldap_unbind.