]> git.sur5r.net Git - openldap/commitdiff
plug one-time leaks
authorPierangelo Masarati <ando@openldap.org>
Sat, 19 Nov 2005 18:44:54 +0000 (18:44 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 19 Nov 2005 18:44:54 +0000 (18:44 +0000)
servers/slapd/back-ldap/chain.c
servers/slapd/back-ldap/config.c

index d06fe256658ec7db474b8b69a83556bd04c21599..60cb2ad4279ba49eeec0ea1866fb39f754d78812 100644 (file)
@@ -1408,6 +1408,7 @@ ldap_chain_db_destroy(
        rc = ldap_chain_db_func( be, db_destroy );
 
        if ( lc ) {
+               avl_free( lc->lc_lai.lai_tree, NULL );
                ch_free( lc );
        }
 
index b7e3ecedf83e7174b7f717fa71d945d5ca5156aa..0bac751669ec6d02a7c0ed891d7db639942fff44 100644 (file)
@@ -67,7 +67,7 @@ enum {
 
 static ConfigTable ldapcfg[] = {
        { "uri", "uri", 2, 2, 0,
-               ARG_STRING|ARG_MAGIC|LDAP_BACK_CFG_URI,
+               ARG_MAGIC|LDAP_BACK_CFG_URI,
                ldap_back_cf_gen, "( OLcfgDbAt:0.14 "
                        "NAME 'olcDbURI' "
                        "DESC 'URI (list) for remote DSA' "
@@ -298,7 +298,10 @@ ldap_back_cf_gen( ConfigArgs *c )
                switch( c->type ) {
                case LDAP_BACK_CFG_URI:
                        if ( li->li_uri != NULL ) {
-                               c->value_string = ch_strdup( li->li_uri );
+                               struct berval   bv;
+
+                               ber_str2bv( li->li_uri, 0, 0, &bv );
+                               value_add_one( &c->rvalue_vals, &bv );
 
                        } else {
                                rc = 1;
@@ -629,7 +632,7 @@ ldap_back_cf_gen( ConfigArgs *c )
                }
 
                /* PARANOID: DN and more are not required nor allowed */
-               urlrc = ldap_url_parselist_ext( &lud, c->value_string, ", \t" );
+               urlrc = ldap_url_parselist_ext( &lud, c->argv[ 1 ], ", \t" );
                if ( urlrc != LDAP_URL_SUCCESS ) {
                        char    *why;