]> git.sur5r.net Git - openldap/commitdiff
For ITS#5421: Also LBER_FREE() -> ber_memfree()
authorHallvard Furuseth <hallvard@openldap.org>
Mon, 22 Nov 2010 13:14:29 +0000 (13:14 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Mon, 22 Nov 2010 13:14:29 +0000 (13:14 +0000)
servers/slapd/back-ldap/search.c
servers/slapd/back-meta/map.c
servers/slapd/back-meta/search.c

index 950e02108da974ed49c230c4fa8b4b2c1ecc073f..7bde44d763c58d4abde5ff2062c37f125e7b267c 100644 (file)
@@ -790,7 +790,7 @@ ldap_build_entry(
                                        rc = LDAP_SUCCESS;
 
                                } else {
-                                       LBER_FREE( attr->a_vals[i].bv_val );
+                                       ber_memfree( attr->a_vals[i].bv_val );
                                        if ( --last == i ) {
                                                BER_BVZERO( &attr->a_vals[i] );
                                                break;
@@ -802,7 +802,7 @@ ldap_build_entry(
                        }
 
                        if ( rc == LDAP_SUCCESS && pretty ) {
-                               LBER_FREE( attr->a_vals[i].bv_val );
+                               ber_memfree( attr->a_vals[i].bv_val );
                                attr->a_vals[i] = pval;
                        }
                }
@@ -828,7 +828,7 @@ ldap_build_entry(
                                        NULL );
 
                                if ( rc != LDAP_SUCCESS ) {
-                                       LBER_FREE( attr->a_vals[i].bv_val );
+                                       ber_memfree( attr->a_vals[i].bv_val );
                                        if ( --last == i ) {
                                                BER_BVZERO( &attr->a_vals[i] );
                                                break;
@@ -859,8 +859,8 @@ ldap_build_entry(
 
                                /* Strip duplicate values */
                                if ( attr->a_nvals != attr->a_vals )
-                                       LBER_FREE( attr->a_nvals[i].bv_val );
-                               LBER_FREE( attr->a_vals[i].bv_val );
+                                       ber_memfree( attr->a_nvals[i].bv_val );
+                               ber_memfree( attr->a_vals[i].bv_val );
                                attr->a_numvals--;
 
                                assert( i >= 0 );
index e90d3dd187348e0844e5bf2c037183537d37e7e5..5158bfcfaff1e85c912ef846e60c1aa4926c149b 100644 (file)
@@ -742,7 +742,7 @@ ldap_back_referral_result_rewrite(
                         * legal to trim values when adding/modifying;
                         * it should be when searching (e.g. ACLs).
                         */
-                       LBER_FREE( a_vals[ i ].bv_val );
+                       ber_memfree( a_vals[ i ].bv_val );
                        if ( last > i ) {
                                a_vals[ i ] = a_vals[ last ];
                        }
@@ -855,7 +855,7 @@ ldap_dnattr_result_rewrite(
                         * legal to trim values when adding/modifying;
                         * it should be when searching (e.g. ACLs).
                         */
-                       LBER_FREE( a_vals[i].bv_val );
+                       ber_memfree( a_vals[i].bv_val );
                        if ( last > i ) {
                                a_vals[i] = a_vals[last];
                        }
@@ -866,7 +866,7 @@ ldap_dnattr_result_rewrite(
                default:
                        /* leave attr untouched if massage failed */
                        if ( !BER_BVISNULL( &bv ) && a_vals[i].bv_val != bv.bv_val ) {
-                               LBER_FREE( a_vals[i].bv_val );
+                               ber_memfree( a_vals[i].bv_val );
                                a_vals[i] = bv;
                        }
                        break;
index 05afd70cb6f9a105cae0b203acfe1a517a0b4168..37028dbac1ec16c14934cd10ec8b54e2fc765d0e 100644 (file)
@@ -2098,7 +2098,7 @@ remove_oc:;
                                }
 
                                if ( rc ) {
-                                       LBER_FREE( attr->a_vals[i].bv_val );
+                                       ber_memfree( attr->a_vals[i].bv_val );
                                        if ( --last == i ) {
                                                BER_BVZERO( &attr->a_vals[ i ] );
                                                break;
@@ -2110,7 +2110,7 @@ remove_oc:;
                                }
 
                                if ( pretty ) {
-                                       LBER_FREE( attr->a_vals[i].bv_val );
+                                       ber_memfree( attr->a_vals[i].bv_val );
                                        attr->a_vals[i] = pval;
                                }
                        }
@@ -2135,7 +2135,7 @@ remove_oc:;
                                        attr->a_desc->ad_type->sat_equality,
                                        &attr->a_vals[i], &attr->a_nvals[i],
                                        NULL )) {
-                                       LBER_FREE( attr->a_vals[i].bv_val );
+                                       ber_memfree( attr->a_vals[i].bv_val );
                                        if ( --last == i ) {
                                                BER_BVZERO( &attr->a_vals[ i ] );
                                                break;
@@ -2217,8 +2217,8 @@ next_attr:;
 
                                        /* Strip duplicate values */
                                        if ( attr->a_nvals != attr->a_vals )
-                                               LBER_FREE( attr->a_nvals[i].bv_val );
-                                       LBER_FREE( attr->a_vals[i].bv_val );
+                                               ber_memfree( attr->a_nvals[i].bv_val );
+                                       ber_memfree( attr->a_vals[i].bv_val );
                                        attr->a_numvals--;
                                        if ( (unsigned)i < attr->a_numvals ) {
                                                attr->a_vals[i] = attr->a_vals[attr->a_numvals];