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

assert on LDAP_MEMORY_DEBUG (ITS#2360)

Full_Name: Eli Elhadad
Version: 2..1.12
OS: win2k pro
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (

i have a major memory consumption on my win2k pro using 2.1.12 with bdb 4.1.25
using LDAP_MEMORY_DEBUG i got an assertion while doing a simple search:
ldapsearch -x -b cn=root -s sub -h cn=root
the assert:
assert( mh->bm_top == LBER_MEM_JUNK);
from the function:
if( fstr.bv_val != NULL) free( fstr.bv_val );

looking in the code, i've noticed that fstr.bv_val was allocated using simple
malloc call, while other freed item were allocated using LDAP_MALLOC,
by changing all calls from malloc to LDAP_MALLOC in the servers/slapd/filter.c
file the assertion didn't happen again and from the debugger point of view, all
of the free process looks good too.
is it a bug (memory leak) or i'ts ok?