From: Pierangelo Masarati Date: Sat, 19 Nov 2005 18:44:54 +0000 (+0000) Subject: plug one-time leaks X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~775 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=39d721504a1b0a8d515ffa239363aada4b94f89b;p=openldap plug one-time leaks --- diff --git a/servers/slapd/back-ldap/chain.c b/servers/slapd/back-ldap/chain.c index d06fe25665..60cb2ad427 100644 --- a/servers/slapd/back-ldap/chain.c +++ b/servers/slapd/back-ldap/chain.c @@ -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 ); } diff --git a/servers/slapd/back-ldap/config.c b/servers/slapd/back-ldap/config.c index b7e3ecedf8..0bac751669 100644 --- a/servers/slapd/back-ldap/config.c +++ b/servers/slapd/back-ldap/config.c @@ -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;