Commit b39e9d15 authored by Hallvard Furuseth's avatar Hallvard Furuseth
Browse files

For ITS#5421: Remove ldap-int.h dependencies.

LDAP_FREE() -> ber_memfree(), msg->lm_ber -> ldap_get_message_ber(msg).
parent 18e348a3
......@@ -575,7 +575,7 @@ retry:
if ( dnPretty( NULL, &match, &pmatch, op->o_tmpmemctx ) == LDAP_SUCCESS ) {
rs->sr_matched = pmatch.bv_val;
LDAP_FREE( match.bv_val );
ber_memfree( match.bv_val );
} else {
rs->sr_matched = match.bv_val;
......@@ -615,14 +615,14 @@ finish:;
ber_memfree_x( (char *)rs->sr_matched, op->o_tmpmemctx );
} else {
LDAP_FREE( match.bv_val );
ber_memfree( match.bv_val );
}
rs->sr_matched = save_matched;
}
if ( rs->sr_text ) {
if ( freetext ) {
LDAP_FREE( (char *)rs->sr_text );
ber_memfree( (char *)rs->sr_text );
}
rs->sr_text = NULL;
}
......@@ -655,7 +655,7 @@ ldap_build_entry(
struct berval *bdn )
{
struct berval a;
BerElement ber = *e->lm_ber;
BerElement ber = *ldap_get_message_ber( e );
Attribute *attr, **attrp;
const char *text;
int last;
......
......@@ -769,7 +769,7 @@ ldap_back_referral_result_rewrite(
ber_memfree_x( a_vals[ i ].bv_val, memctx );
ber_str2bv_x( newurl, 0, 1, &a_vals[ i ], memctx );
LDAP_FREE( newurl );
ber_memfree( newurl );
ludp->lud_dn = olddn.bv_val;
}
break;
......
......@@ -1848,7 +1848,7 @@ meta_send_entry(
int check_duplicate_attrs = 0;
int check_sorted_attrs = 0;
Entry ent = { 0 };
BerElement ber = *e->lm_ber;
BerElement ber = *ldap_get_message_ber( e );
Attribute *attr, **attrp;
struct berval bdn,
dn = BER_BVNULL;
......
......@@ -987,7 +987,7 @@ rwm_referral_rewrite(
}
ber_str2bv( newurl, 0, 1, &a_vals[i] );
LDAP_FREE( newurl );
ber_memfree( newurl );
if ( pa_nvals ) {
ludp->lud_dn = ndn.bv_val;
......@@ -1007,7 +1007,7 @@ rwm_referral_rewrite(
ch_free( (*pa_nvals)[i].bv_val );
}
ber_str2bv( newurl, 0, 1, &(*pa_nvals)[i] );
LDAP_FREE( newurl );
ber_memfree( newurl );
}
ch_free( oldval.bv_val );
......@@ -1218,7 +1218,7 @@ rwm_referral_result_rewrite(
ch_free( a_vals[i].bv_val );
ber_str2bv( newurl, 0, 1, &a_vals[i] );
LDAP_FREE( newurl );
ber_memfree( newurl );
ludp->lud_dn = olddn.bv_val;
}
break;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment