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

unexpected exit when freeing handle (ITS#1442)

Full_Name: Virginie Seltrecht
Version: 2.0.15
OS: Solaris 2.6
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (

I'm using the OpenLDAP C API to connect my client program to LDAP servers in
order to perform authentication. My program establishes a permanent connection
and then sends search requests each time an authentication request is received.
Sometimes, especially when the server is stopped, my program receives a
LDAP_SERVER_DOWN error as result of a search request. I then have a handle on
the broken connection that I need to free (in order to avoid memory leaks). When
I wrote my code for non secured connections, I first used ldap_unbind() but my
program exited from time to time in this function. So I replaced this call by
ldap_ld_free() which worked perfectly well so far.
Now I have to deal with TLS connections and even with ldap_ld_free, my program
exits, and every time. I used a debugger and here is where the program exits :
#0  0xef33eaac in nvmatch ()
#1  0xef33ea70 in getenv ()
#2  0xef31bae8 in dcgettext_u ()
#3  0xef31ba50 in dgettext ()
#4  0xef749280 in sb_debug_write (sbiod=0x5185c8, buf=0x0, len=29) at
#5  0xef785dd8 in sb_tls_bio_write (b=0x512f10, buf=0x531168 "\025\003\001",
len=29) at tls.c:498
#6  0xef5ee4b8 in BIO_write ()
#7  0xef6ff298 in ssl3_write_pending ()
#8  0xef6fe570 in do_ssl3_write ()
#9  0xef6ff024 in ssl3_dispatch_alert ()
#10 0xef6fefdc in ssl3_send_alert ()
#11 0xef6fca3c in ssl3_shutdown ()
#12 0xef705a1c in SSL_shutdown ()
#13 0xef7859a4 in sb_tls_close (sbiod=0x518190) at tls.c:347
#14 0xef7482d4 in ber_int_sb_close (sb=0x512710) at sockbuf.c:364
#15 0xef747938 in ber_sockbuf_free (sb=0x512710) at sockbuf.c:61
#16 0xef775bb4 in ldap_ld_free (ld=0x51de30, close=0, sctrls=0x0, cctrls=0x0) at