]> git.sur5r.net Git - openldap/commitdiff
Don't implicitly inherit the default SSL_CTX, tls.c:alloc_handle will
authorHoward Chu <hyc@openldap.org>
Fri, 7 Apr 2006 01:52:32 +0000 (01:52 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 7 Apr 2006 01:52:32 +0000 (01:52 +0000)
set it explicitly and handle its refcount.

libraries/libldap/open.c

index 35ef7ad87604a35ee0393218e7392a46458739c3..d1eaf04b2ac6dd8b4696792ad2e8bb3cfe11c718 100644 (file)
@@ -137,12 +137,12 @@ ldap_create( LDAP **ldp )
 #endif
 
 #ifdef HAVE_TLS
-       /* We inherit the SSL_CTX, don't need the names/paths. Leave them
-        * empty to allow new SSL_CTX's to be created from scratch.
+       /* We explicitly inherit the SSL_CTX, don't need the names/paths. Leave
+        * them empty to allow new SSL_CTX's to be created from scratch.
         */
        memset( &ld->ld_options.ldo_tls_info, 0,
                sizeof( ld->ld_options.ldo_tls_info ));
-
+       ld->ld_options.ldo_tls_ctx = NULL;
 #endif
 
        if ( gopts->ldo_tm_api &&