]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/unbind.c
Fix attribute description checks
[openldap] / libraries / libldap / unbind.c
index b138161a41fd1a5b5ae3b551357e1af0606501d3..4e1c1fd786d3a20bd95baa34e345ab52ac5e19ae 100644 (file)
@@ -131,12 +131,32 @@ ldap_ld_free(
                ld->ld_options.ldo_tm_net = NULL;
        }
 
+#ifdef HAVE_CYRUS_SASL
+       if ( ld->ld_options.ldo_def_sasl_mech != NULL ) {
+               LDAP_FREE( ld->ld_options.ldo_def_sasl_mech );
+               ld->ld_options.ldo_def_sasl_mech = NULL;
+       }
+
+       if ( ld->ld_options.ldo_def_sasl_realm != NULL ) {
+               LDAP_FREE( ld->ld_options.ldo_def_sasl_realm );
+               ld->ld_options.ldo_def_sasl_realm = NULL;
+       }
+
+       if ( ld->ld_options.ldo_def_sasl_authcid != NULL ) {
+               LDAP_FREE( ld->ld_options.ldo_def_sasl_authcid );
+               ld->ld_options.ldo_def_sasl_authcid = NULL;
+       }
+
+       if ( ld->ld_options.ldo_def_sasl_authzid != NULL ) {
+               LDAP_FREE( ld->ld_options.ldo_def_sasl_authzid );
+               ld->ld_options.ldo_def_sasl_authzid = NULL;
+       }
+#endif
+
        ber_sockbuf_free( ld->ld_sb );   
    
        LDAP_FREE( (char *) ld );
    
-       WSACleanup();
-
        return( err );
 }