]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/attr.c
Fixup bdb_entry_release now that entry_decode uses two memory blocks
[openldap] / servers / slapd / attr.c
index 9239e161f812e6c378608858e8c8f7ec2edcb634..99d1e3bb87dcdb19bfdfdd7f3bf392e7889abba6 100644 (file)
 #include "slap.h"
 
 #ifdef LDAP_DEBUG
-static void at_index_print( void );
+static void at_index_print( void ) {};
 #endif
 
 void
 attr_free( Attribute *a )
 {
-       ad_free( a->a_desc, 1 );
        ber_bvecfree( a->a_vals );
        free( a );
 }
@@ -74,7 +73,7 @@ Attribute *attr_dup( Attribute *a )
                tmp->a_vals = NULL;
        }
 
-       tmp->a_desc = ad_dup( a->a_desc );
+       tmp->a_desc = a->a_desc;
        tmp->a_next = NULL;
 
        return tmp;
@@ -124,7 +123,7 @@ attr_merge(
 
        if ( *a == NULL ) {
                *a = (Attribute *) ch_malloc( sizeof(Attribute) );
-               (*a)->a_desc = ad_dup( desc );
+               (*a)->a_desc = desc;
                (*a)->a_vals = NULL;
                (*a)->a_next = NULL;
        }