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

RE: Memory leak in ldap_initialize()



I can't believe that. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


Just doing:

for (i=1; i<100000; i++)
{
    ldap_initialize(&ld, ldap://localhost:389";);
    ldap_bind(ld, "cn=admin,dc=example,dc=com", "secret", LDAP_AUTH_SIMPLE);
    ldap_unbind(ld);
}

make the memory leak growing at a speed of about 80 bytes / connection
!!!!!!!!!!!!

So there is a leak in ldap_initialize().
In which version is it fixed ?

Thanks for information.

Yves


-----Original Message-----
From: owner-openldap-software@OpenLDAP.org
[mailto:owner-openldap-software@OpenLDAP.org]On Behalf Of Yves Robin
Sent: Tuesday, August 13, 2002 9:23 PM
To: Jeff Costlow; Mailing list OpenLdap
Subject: RE: Memory leak in ldap_initialize()


Do you propose to make n times (ldap_intialize() + l + ldap_bind() +
ldap_unbind())

or

ldap_initialize() + n times (ldap_bind() + ldap_unbind())

?

Yves
-----Original Message-----
From: Jeff Costlow [mailto:j.costlow@f5.com]
Sent: Tuesday, August 13, 2002 6:39 PM
To: 'Yves Robin'; Mailing list OpenLdap
Subject: RE: Memory leak in ldap_initialize()


Try making n connections and see if the memory leak grows.
>From my experience, this is a static leak, and it will not grow.
-----Original Message-----
From: Yves Robin [mailto:yves@reefedge.com]
Sent: Tuesday, August 13, 2002 8:53 AM
To: Mailing list OpenLdap
Subject: Memory leak in ldap_initialize()
Importance: High


Hi all,
I'm facing a memory leak just when trying to bind and unbind to an openldap
server. Since ldap_initialize allocate a new ld structure, unbind is
supposed to free it, right ? Since ldap_initialize is not documented (right
?), it's difficult to be sure...
I'm using openldap 2.0.11 library.
ldap_initialize()
ldap_bind_s()
ldap_unbind()
Anything wrong with that ?
Should i free somehow else ?
Thanks.
Yves