[Date Prev][Date Next]
Core dump on process exit (ITS#1563)
Full_Name: Rolandas Naujikas
OS: FreeBSD 4.4 (4.5) RELEASE
Submission from: (NULL) (184.108.40.206)
>Date: Wed, 30 Jun 1999 15:41:12 -0700
>From: "Kurt D. Zeilenga" <Kurt@OpenLDAP.Org>
>Subject: Re: Fix for Memory Leak (ITS#217)
>At 10:38 PM 6/30/99 GMT, firstname.lastname@example.org wrote:
>>Full_Name: Tim Bowman
>>OS: Linux & NT
>>Submission from: (NULL) (220.127.116.11)
>>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
>>an ldap.conf file is read. This is a one-time allocation, so it's only a
>>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...
This doesn't work because shared libraries can be unloaded early than process
exits. Example is pam_ldap (134 & 136) module from www.padl.com.
>> ldap needs an ldap_uninit to pair with ldap_init.
>ldap_init/ldap_open are paired with ldap_unbind.