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

Re: exit while in ldap_ld_free



Well, that's what I did first, when I wrote my program for non TLS
connections. But, my program was crashing regularly when I called this
function after I received a LDAP_SERVER_DOWN error as result of a
ldap_search_st. Just suppressing this call was provoking memory leaks that's
why I ended up with using ldap_ld_free, which worked perfectly well. Now
that I am trying to deal with TLS connections, ldap_ld_free doesn't work
anymore.

So I've decided to upgrade the library from 2.0.11 to 2.0.15 in case some
problems related to mine had been solved.
First, I've had problems with ldap_start_tls_s (I get the error 0x1
OPERATIONS ERROR ). So I decided to use ldap_simple_bind_s without calling
ldap_start_tls_s before, and in this case the connection works. This solved,
I've tried again to run my simple test : stop the LDAP server and send a
search request. Well, nothing has changed with this version, it still exits
in ldap_ld_free. To be sure there really was a problem, I replaced
ldap_ld_free with ldap_unbind as you suggested, but it is worse because my
program exits not only with TLS connections but also with non TLS
connections.

So what am I supposed to do after this LDAP_SERVER_DOWN error ? Nothing but
cry after my memory leaks (Well I've not checked they still exist in 2.0.15
but I somehow feel that I need to do something with my still allocated
handle)?

Please, please, please, I really need help on this! Any hint will be really
appreciated!

Virginie Seltrecht.

----- Original Message -----
From: Kurt D. Zeilenga <Kurt@OpenLDAP.org>
To: SELTRECHT Virginie - REN <Virginie.SELTRECHT@sema.fr>
Cc: OpenLDAP <openldap-software@OpenLDAP.org>
Sent: Friday, November 02, 2001 4:24 AM
Subject: Re: exit while in ldap_ld_free


> At 03:07 AM 2001-10-30, SELTRECHT Virginie - REN wrote:
> >I then call ldap_ld free
>
> You should use ldap_unbind() not an internal API function.