Skip to content
Snippets Groups Projects
Commit 62febe5d authored by Jong Hyuk Choi's avatar Jong Hyuk Choi
Browse files

fix slap_sl_free() calls in pre / post read controls

parent 616d7962
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment