]> git.sur5r.net Git - openldap/commitdiff
ITS#791: fix SASL ctx close
authorKurt Zeilenga <kurt@openldap.org>
Fri, 29 Sep 2000 18:27:06 +0000 (18:27 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 29 Sep 2000 18:27:06 +0000 (18:27 +0000)
libraries/libldap/cyrus.c

index 5930e84b23c30fe8e9ee54d5735dda2f877a0996..6560eeebb3d64ae4f0a2aede340dbbbd8775e7f2 100644 (file)
@@ -327,8 +327,10 @@ int ldap_pvt_sasl_install( Sockbuf *sb, void *ctx_arg )
 
        if ( !ber_sockbuf_ctrl( sb, LBER_SB_OPT_HAS_IO,
                        &ldap_pvt_sockbuf_io_sasl ) )
+       {
                ber_sockbuf_add_io( sb, &ldap_pvt_sockbuf_io_sasl,
                        LBER_SBIOD_LEVEL_APPLICATION, ctx_arg );
+       }
 
        return LDAP_SUCCESS;
 }
@@ -437,9 +439,8 @@ ldap_int_sasl_open(
 int ldap_int_sasl_close( LDAP *ld, LDAPConn *lc )
 {
        sasl_conn_t *ctx = lc->lconn_sasl_ctx;
-       assert( ctx != NULL );
 
-       if( ctx ) {
+       if( ctx != NULL ) {
                sasl_dispose( &ctx );
                lc->lconn_sasl_ctx = NULL;
        }