ldap_back_getconn( Operation *op, SlapReply *rs, ldap_back_send_t sendok )
 {
        struct ldapinfo *li = (struct ldapinfo *)op->o_bd->be_private;
-       struct ldapconn *lc, lc_curr = { 0 };
+       struct ldapconn *lc,
+                       lc_curr = { 0 };
        int             refcnt = 1;
 
        /* Searches for a ldapconn in the avl tree */
 
                ARG_BERVAL|ARG_MAGIC|LDAP_BACK_CFG_ACL_PASSWD,
                ldap_back_cf_gen, NULL, NULL, NULL },
        { "acl-bind", "args", 2, 0, 0,
-               ARG_STRING|ARG_MAGIC|LDAP_BACK_CFG_ACL_BIND,
+               ARG_MAGIC|LDAP_BACK_CFG_ACL_BIND,
                ldap_back_cf_gen, "( OLcfgDbAt:3.4 "
                        "NAME 'olcDbACLBind' "
                        "DESC 'Remote ACL administrative identity auth bind configuration' "
                ARG_BERVAL|ARG_MAGIC|LDAP_BACK_CFG_IDASSERT_PASSWD,
                ldap_back_cf_gen, NULL, NULL, NULL },
        { "idassert-bind", "args", 2, 0, 0,
-               ARG_STRING|ARG_MAGIC|LDAP_BACK_CFG_IDASSERT_BIND,
+               ARG_MAGIC|LDAP_BACK_CFG_IDASSERT_BIND,
                ldap_back_cf_gen, "( OLcfgDbAt:3.7 "
                        "NAME 'olcDbIDAssertBind' "
                        "DESC 'Remote Identity Assertion administrative identity auth bind configuration' "
                li->url = ldap_charray2str( urllist, " " );
                ldap_charray_free( urllist );
 #else
-               li->url = ch_strdup( c->value_string );
+               li->url = c->value_string;
 #endif
                break;
        }
 
 static ConfigDriver config_timelimit;
 static ConfigDriver config_overlay;
 static ConfigDriver config_suffix; 
-static ConfigDriver config_deref_depth;
 static ConfigDriver config_rootdn;
 static ConfigDriver config_rootpw;
 static ConfigDriver config_restrict;
 
        if (c->op == SLAP_CONFIG_EMIT) {
                if (!BER_BVISEMPTY(&c->be->be_rootpw)) {
-                       ber_dupbv( &c->value_bv, &c->be->be_rootpw);
+                       /* don't copy, because "rootpw" is marked
+                        * as CFG_BERVAL */
+                       c->value_bv = c->be->be_rootpw;
                        return 0;
                }
                return 1;
        return slap_verbmasks_init( &loglevel_ops, lo );
 }
 
+static void
+loglevel_destroy( void )
+{
+       if ( loglevel_ops ) {
+               (void)slap_verbmasks_destroy( loglevel_ops );
+       }
+       loglevel_ops = NULL;
+}
+
 static slap_mask_t     loglevel_ignore[] = { -1, 0 };
 
 int
 
        free( be->be_private );
 
+       loglevel_destroy();
+
        return 0;
 }