fix slap_sl_free() calls in pre / post read controls

This commit is contained in:
Jong Hyuk Choi 2004-11-10 21:38:41 +00:00
parent 616d7962ef
commit 62febe5dff
5 changed files with 13 additions and 13 deletions

View File

@ -469,8 +469,8 @@ done:
}
if( postread_ctrl != NULL ) {
slap_sl_free( (*postread_ctrl)->ldctl_value.bv_val, &op->o_tmpmemctx );
slap_sl_free( *postread_ctrl, &op->o_tmpmemctx );
slap_sl_free( (*postread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx );
slap_sl_free( *postread_ctrl, op->o_tmpmemctx );
}
return rs->sr_err;
}

View File

@ -595,8 +595,8 @@ done:
slap_sl_free( ctxcsn_ndn.bv_val, op->o_tmpmemctx );
if( preread_ctrl != NULL ) {
slap_sl_free( (*preread_ctrl)->ldctl_value.bv_val, &op->o_tmpmemctx );
slap_sl_free( *preread_ctrl, &op->o_tmpmemctx );
slap_sl_free( (*preread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx );
slap_sl_free( *preread_ctrl, op->o_tmpmemctx );
}
return rs->sr_err;
}

View File

@ -662,12 +662,12 @@ done:
}
if( preread_ctrl != NULL ) {
slap_sl_free( (*preread_ctrl)->ldctl_value.bv_val, &op->o_tmpmemctx );
slap_sl_free( *preread_ctrl, &op->o_tmpmemctx );
slap_sl_free( (*preread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx );
slap_sl_free( *preread_ctrl, op->o_tmpmemctx );
}
if( postread_ctrl != NULL ) {
slap_sl_free( (*postread_ctrl)->ldctl_value.bv_val, &op->o_tmpmemctx );
slap_sl_free( *postread_ctrl, &op->o_tmpmemctx );
slap_sl_free( (*postread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx );
slap_sl_free( *postread_ctrl, op->o_tmpmemctx );
}
return rs->sr_err;
}

View File

@ -949,12 +949,12 @@ done:
}
if( preread_ctrl != NULL ) {
slap_sl_free( (*preread_ctrl)->ldctl_value.bv_val, &op->o_tmpmemctx );
slap_sl_free( *preread_ctrl, &op->o_tmpmemctx );
slap_sl_free( (*preread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx );
slap_sl_free( *preread_ctrl, op->o_tmpmemctx );
}
if( postread_ctrl != NULL ) {
slap_sl_free( (*postread_ctrl)->ldctl_value.bv_val, &op->o_tmpmemctx );
slap_sl_free( *postread_ctrl, &op->o_tmpmemctx );
slap_sl_free( (*postread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx );
slap_sl_free( *postread_ctrl, op->o_tmpmemctx );
}
return rs->sr_err;
}

View File

@ -1510,7 +1510,7 @@ int slap_read_controls(
*ctrl = (LDAPControl *) slap_sl_calloc( 1, sizeof(LDAPControl), NULL );
} else {
/* retry: free previous try */
slap_sl_free( (*ctrl)->ldctl_value.bv_val, &op->o_tmpmemctx );
slap_sl_free( (*ctrl)->ldctl_value.bv_val, op->o_tmpmemctx );
}
**ctrl = c;