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

Re: question regarding ldap_unbind.



> Hi Folks,
>
> I am using OpenLDAP 2.2.20 and I am running into issues with ldap_unbind
> and
> freeing up memory when ldap_simple_bind( ) fails. I searched the internet
> but no luck, so mailing you folks for some help.
>
> Question is :
> 1. If an ldap_simple_bind( ) fails, do we do ldap_unbind ?
> 2. If yes then is there a known issue in OpenLDAP 2.2.20 because  when I
> call ldap_unbind ( ), my process gets stuck and the cpu utilization shoots
> upto 99%.
> 2. If not then how do we free the memory allocated by ldap_init ( )?

After a successful ldap_initialize() (or ldap_init()), the LDAP *
structure should be freed by ldap_unbind() (__exactly__ once) regardless
of success or failure.  If anything goes wrong, then it's a bug.  The fact
that you're getting errors with OpenLDAP 2.2.20 is not really significant,
I'd first of all check with OpenLDAP 2.3.13 (the latest); a spin with the
latest OpenLDAP 2.2 would be an option.

p.

-- 
Pierangelo Masarati
mailto:pierangelo.masarati@sys-net.it



Ing. Pierangelo Masarati
Responsabile Open Solution

SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
------------------------------------------
Office:   +39.02.23998309          
Mobile:   +39.333.4963172
Email:    pierangelo.masarati@sys-net.it
------------------------------------------