]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/ad.c
Added bdb_attribute and bdb_group ACL support routines
[openldap] / servers / slapd / ad.c
index 7ea0734aab6d467b774c2a04ea7c126b59c871c1..29a16f2292047fc21237baaa97017714a0f131e4 100644 (file)
@@ -37,6 +37,16 @@ static int ad_keystring(
        return 0;
 }
 
+void ad_destroy( void *in )
+{
+       AttributeDescription *ad = in, *n;
+
+       for (;ad;ad = n) {
+               n = ad->ad_next;
+               ldap_memfree(ad);
+       }
+}
+
 int slap_str2ad(
        const char *str,
        AttributeDescription **ad,
@@ -88,7 +98,7 @@ int slap_bv2ad(
        if (options != NULL)
                desc.ad_cname.bv_len = options - name;
        else
-               desc.ad_cname.bv_len = strlen(name);
+               desc.ad_cname.bv_len = bv->bv_len;
 
        desc.ad_flags = SLAP_DESC_NONE;
        desc.ad_lang.bv_len = 0;