int i;
for (i=0; ctrls[i]; i++) {
- op->o_tmpfree( ctrls[i], op->o_tmpmemctx );
+ op->o_tmpfree(ctrls[i], op->o_tmpmemctx );
}
op->o_tmpfree( ctrls, op->o_tmpmemctx );
}
-void slap_free_ctrl_vals(
- Operation *op,
- LDAPControl **ctrls )
-{
- int i;
-
- for (i=0; ctrls[i]; i++) {
- if ( ctrls[i]->ldctl_value.bv_val )
- op->o_tmpfree( ctrls[i]->ldctl_value.bv_val, op->o_tmpmemctx );
- }
- slap_free_ctrls( op, ctrls );
-}
-
int slap_add_ctrls(
Operation *op,
SlapReply *rs,
LDAP_SLAPD_F (void) slap_free_ctrls LDAP_P((
Operation *op,
LDAPControl **ctrls ));
-LDAP_SLAPD_F (void) slap_free_ctrl_vals LDAP_P((
- Operation *op,
- LDAPControl **ctrls ));
LDAP_SLAPD_F (int) slap_add_ctrls LDAP_P((
Operation *op,
SlapReply *rs,
if ( rs->sr_flags & REP_CTRLS_MUSTBEFREED ) {
rs->sr_flags ^= REP_CTRLS_MUSTBEFREED; /* paranoia */
if ( rs->sr_ctrls ) {
- slap_free_ctrl_vals( op, rs->sr_ctrls );
+ slap_free_ctrls( op, rs->sr_ctrls );
rs->sr_ctrls = NULL;
}
}
if ( rs->sr_flags & REP_CTRLS_MUSTBEFREED ) {
rs->sr_flags ^= REP_CTRLS_MUSTBEFREED; /* paranoia */
if ( rs->sr_ctrls ) {
- slap_free_ctrl_vals( op, rs->sr_ctrls );
+ slap_free_ctrls( op, rs->sr_ctrls );
rs->sr_ctrls = NULL;
}
}
if ( rs->sr_flags & REP_CTRLS_MUSTBEFREED ) {
rs->sr_flags ^= REP_CTRLS_MUSTBEFREED; /* paranoia */
if ( rs->sr_ctrls ) {
- slap_free_ctrl_vals( op, rs->sr_ctrls );
+ slap_free_ctrls( op, rs->sr_ctrls );
rs->sr_ctrls = NULL;
}
}