From: Hallvard Furuseth Date: Mon, 22 Nov 2010 13:14:29 +0000 (+0000) Subject: For ITS#5421: Also LBER_FREE() -> ber_memfree() X-Git-Tag: MIGRATION_CVS2GIT~406 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e1469fff4417c16b87bd0be13b52a70048187b01;p=openldap For ITS#5421: Also LBER_FREE() -> ber_memfree() --- diff --git a/servers/slapd/back-ldap/search.c b/servers/slapd/back-ldap/search.c index 950e02108d..7bde44d763 100644 --- a/servers/slapd/back-ldap/search.c +++ b/servers/slapd/back-ldap/search.c @@ -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 ); diff --git a/servers/slapd/back-meta/map.c b/servers/slapd/back-meta/map.c index e90d3dd187..5158bfcfaf 100644 --- a/servers/slapd/back-meta/map.c +++ b/servers/slapd/back-meta/map.c @@ -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; diff --git a/servers/slapd/back-meta/search.c b/servers/slapd/back-meta/search.c index 05afd70cb6..37028dbac1 100644 --- a/servers/slapd/back-meta/search.c +++ b/servers/slapd/back-meta/search.c @@ -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];