[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: ber_memfree debugging
"Kurt D. Zeilenga" wrote:
>
> At 09:39 PM 6/6/99 +0200, Bert Vermeulen wrote:
> >It's bombing out on me because
> >ldap_str2attributetype() in libldap frees pointers regardless if they've
> >been used or not.
>
> Before the recent memory allocation changes, this code called
> free(NULL). This is a bug. OpenLDAP should not assume
> STDC semantics. I've added asserts specifically to detect
> such bugs.
IIRC, it called ldap_memfree, that was NULL-safe. If the free routines
are now NULL-unsafe, the code should be fixed. Should I do this?
On a related topic, Bert has asked me to externalize free_syn, free_at
and free_oc (whose names would have to be prefixed by ldap_ or something)
so that they can be used from clients. I see no problem with this, except
that current code in slapd presumes that once such an entity has been
passed to at_add, oc_add, etc. it will not be freed since it just copies
pointers around except for temporary copies made at places outside of
schemaparse.c and friends. We may do it with this restriction.
Julio