mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-07 14:18:15 +08:00
fix slap_sl_free() calls in pre / post read controls
This commit is contained in:
parent
616d7962ef
commit
62febe5dff
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user