]> git.sur5r.net Git - openldap/commitdiff
misc cleanup/resource init/release from HEAD
authorPierangelo Masarati <ando@openldap.org>
Wed, 5 Apr 2006 23:53:57 +0000 (23:53 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 5 Apr 2006 23:53:57 +0000 (23:53 +0000)
servers/slapd/back-ldap/chain.c
servers/slapd/back-ldap/config.c

index 779be7697bffba864fece8bf80d826515682fc5a..97d6fb3234e214417ee16c27dde71c4d97511ced 100644 (file)
@@ -1284,6 +1284,7 @@ ldap_chain_db_init(
                return 1;
        }
        memset( lc, 0, sizeof( ldap_chain_t ) );
+       ldap_pvt_thread_mutex_init( &lc->lc_lai.lai_mutex );
 
        on->on_bi.bi_private = (void *)lc;
 
@@ -1533,6 +1534,7 @@ ldap_chain_db_destroy(
 
        if ( lc ) {
                avl_free( lc->lc_lai.lai_tree, NULL );
+               ldap_pvt_thread_mutex_destroy( &lc->lc_lai.lai_mutex );
                ch_free( lc );
        }
 
index a00d820b64f6c0ae153eaec865b4fa7852a978de..38c9a95296473d0a1e571c003b54144226b71ef7 100644 (file)
@@ -353,7 +353,7 @@ ldap_back_cf_gen( ConfigArgs *c )
 
                        bindconf_unparse( &li->li_acl, &bv );
 
-                       for ( i = 0; isspace( bv.bv_val[ i ] ); i++ )
+                       for ( i = 0; isspace( (unsigned char) bv.bv_val[ i ] ); i++ )
                                /* count spaces */ ;
 
                        if ( i ) {
@@ -488,7 +488,7 @@ ldap_back_cf_gen( ConfigArgs *c )
                                bv.bv_len = ptr - bv.bv_val;
 
                        } else {
-                               for ( i = 0; isspace( bc.bv_val[ i ] ); i++ )
+                               for ( i = 0; isspace( (unsigned char) bc.bv_val[ i ] ); i++ )
                                        /* count spaces */ ;
 
                                if ( i ) {
@@ -547,7 +547,7 @@ ldap_back_cf_gen( ConfigArgs *c )
                                return 1;
                        }
 
-                       for ( i = 0; isspace( bv.bv_val[ i ] ); i++ )
+                       for ( i = 0; isspace( (unsigned char) bv.bv_val[ i ] ); i++ )
                                /* count spaces */ ;
 
                        if ( i ) {
@@ -1105,6 +1105,7 @@ done_url:;
                                                        "unknown flag \"%s\"",
                                                        flags[ j ] );
                                                Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->msg, 0 );
+                                               ldap_charray_free( flags );
                                                return 1;
                                        }
                                }
@@ -1157,7 +1158,7 @@ done_url:;
 
        case LDAP_BACK_CFG_TIMEOUT:
                for ( i = 1; i < c->argc; i++ ) {
-                       if ( isdigit( c->argv[ i ][ 0 ] ) ) {
+                       if ( isdigit( (unsigned char) c->argv[ i ][ 0 ] ) ) {
                                int             j;
                                unsigned        u;