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

(ITS#4489) Failed slapd startup -> core in ldap_ld_free

Full_Name: Hallvard B Furuseth
Version: HEAD
OS: Linux
Submission from: (NULL) (
Submitted by: hallvard

libexec/slapd with no arguments as non-root fails (as it should)
and then dumps core during cleanup after this patch:

  slapd/main.c,v 1.240 2006/04/06 23:25:46 hyc
  "Use new TLS SSL_CTX support"

It dies in ldap_ld_free(slap_tls_ld,,,) in main.c because slap_tls_ld==NULL:
(gdb) bt
#1  0x0815ca2b in ldap_ld_free (ld=0x0, close=0, sctrls=0x0, cctrls=0x0) at
88              ldap_pvt_thread_mutex_lock( &ld->ld_req_mutex );
#2  0x080659e2 in main (argc=1, argv=0xbffff324) at main.c:967
967             ldap_ld_free( slap_tls_ld, 0, NULL, NULL );

Also, that code ought to #include ../../libraries/libldap/ldap-int.h
for the prototype of ldap_ld_free().  Or move ldap_ld_free to ldap.h,
so ldap_create() in ldap.h gets an inverse.