]> git.sur5r.net Git - openldap/commitdiff
Revert prev commit, impacts too much to take advantage
authorHoward Chu <hyc@openldap.org>
Tue, 4 Mar 2008 10:09:12 +0000 (10:09 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 4 Mar 2008 10:09:12 +0000 (10:09 +0000)
servers/slapd/attr.c
servers/slapd/proto-slap.h

index be18e429ef9015daf83bad648b9597d21a88aca9..e54ed671be4c0f7b8f3d300c4bbeb59fc50568d2 100644 (file)
@@ -124,14 +124,14 @@ attrs_alloc( int num )
 
 
 void
-attr_clean_x( Attribute *a, void *ctx )
+attr_clean( Attribute *a )
 {
        if ( a->a_nvals && a->a_nvals != a->a_vals &&
                !( a->a_flags & SLAP_ATTR_DONT_FREE_VALS )) {
                if ( a->a_flags & SLAP_ATTR_DONT_FREE_DATA ) {
-                       ber_memfree_x( a->a_nvals, ctx );
+                       free( a->a_nvals );
                } else {
-                       ber_bvarray_free_x( a->a_nvals, ctx );
+                       ber_bvarray_free( a->a_nvals );
                }
        }
        /* a_vals may be equal to slap_dummy_bv, a static empty berval;
@@ -141,9 +141,9 @@ attr_clean_x( Attribute *a, void *ctx )
        if ( a->a_vals != &slap_dummy_bv &&
                !( a->a_flags & SLAP_ATTR_DONT_FREE_VALS )) {
                if ( a->a_flags & SLAP_ATTR_DONT_FREE_DATA ) {
-                       ber_memfree_x( a->a_vals, ctx );
+                       free( a->a_vals );
                } else {
-                       ber_bvarray_free_x( a->a_vals, ctx );
+                       ber_bvarray_free( a->a_vals );
                }
        }
        a->a_desc = NULL;
@@ -156,12 +156,6 @@ attr_clean_x( Attribute *a, void *ctx )
        a->a_numvals = 0;
 }
 
-void
-attr_clean( Attribute *a )
-{
-       attr_clean_x( a, NULL );
-}
-
 void
 attr_free( Attribute *a )
 {
@@ -190,7 +184,7 @@ comp_tree_free( Attribute *a )
 #endif
 
 void
-attrs_free_x( Attribute *a, void *ctx )
+attrs_free( Attribute *a )
 {
        if ( a ) {
                Attribute *b = (Attribute *)0xBAD, *tail, *next;
@@ -199,7 +193,7 @@ attrs_free_x( Attribute *a, void *ctx )
                tail = a;
                do {
                        next = a->a_next;
-                       attr_clean_x( a, ctx );
+                       attr_clean( a );
                        a->a_next = b;
                        b = a;
                        a = next;
@@ -214,12 +208,6 @@ attrs_free_x( Attribute *a, void *ctx )
        }
 }
 
-void
-attrs_free( Attribute *a )
-{
-       attrs_free_x( a, NULL );
-}
-
 static void
 attr_dup2( Attribute *tmp, Attribute *a )
 {
index 5911054472cb03855dd9b91a5644e16d7d935f57..69234d99fc7572aa934209ec4c7a00ed9da7a2e4 100644 (file)
@@ -303,7 +303,6 @@ LDAP_SLAPD_F (int) attr_delete LDAP_P((
        Attribute **attrs, AttributeDescription *desc ));
 
 LDAP_SLAPD_F (void) attrs_free LDAP_P(( Attribute *a ));
-LDAP_SLAPD_F (void) attrs_free_x LDAP_P(( Attribute *a, void *ctx ));
 LDAP_SLAPD_F (Attribute *) attrs_dup LDAP_P(( Attribute *a ));
 LDAP_SLAPD_F (int) attr_init LDAP_P(( void ));
 LDAP_SLAPD_F (int) attr_destroy LDAP_P(( void ));