mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-24 13:24:56 +08:00
ITS#4532: check *pre/postread_ctrl before freeing
This commit is contained in:
parent
4c926910d7
commit
b8bf18f36b
@ -459,7 +459,7 @@ return_results:
|
||||
}
|
||||
op->o_private = NULL;
|
||||
|
||||
if( postread_ctrl != NULL ) {
|
||||
if( postread_ctrl != NULL && (*postread_ctrl) != NULL ) {
|
||||
slap_sl_free( (*postread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx );
|
||||
slap_sl_free( *postread_ctrl, op->o_tmpmemctx );
|
||||
}
|
||||
|
@ -571,7 +571,7 @@ return_results:
|
||||
send_ldap_result( op, rs );
|
||||
slap_graduate_commit_csn( op );
|
||||
|
||||
if( preread_ctrl != NULL ) {
|
||||
if( preread_ctrl != NULL && (*preread_ctrl) != NULL ) {
|
||||
slap_sl_free( (*preread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx );
|
||||
slap_sl_free( *preread_ctrl, op->o_tmpmemctx );
|
||||
}
|
||||
|
@ -649,11 +649,11 @@ done:
|
||||
bdb_unlocked_cache_return_entry_w (&bdb->bi_cache, e);
|
||||
}
|
||||
|
||||
if( preread_ctrl != NULL ) {
|
||||
if( preread_ctrl != NULL && (*preread_ctrl) != NULL ) {
|
||||
slap_sl_free( (*preread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx );
|
||||
slap_sl_free( *preread_ctrl, op->o_tmpmemctx );
|
||||
}
|
||||
if( postread_ctrl != NULL ) {
|
||||
if( postread_ctrl != NULL && (*postread_ctrl) != NULL ) {
|
||||
slap_sl_free( (*postread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx );
|
||||
slap_sl_free( *postread_ctrl, op->o_tmpmemctx );
|
||||
}
|
||||
|
@ -811,11 +811,11 @@ done:
|
||||
}
|
||||
op->o_private = NULL;
|
||||
|
||||
if( preread_ctrl != NULL ) {
|
||||
if( preread_ctrl != NULL && (*preread_ctrl) != NULL ) {
|
||||
slap_sl_free( (*preread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx );
|
||||
slap_sl_free( *preread_ctrl, op->o_tmpmemctx );
|
||||
}
|
||||
if( postread_ctrl != NULL ) {
|
||||
if( postread_ctrl != NULL && (*postread_ctrl) != NULL ) {
|
||||
slap_sl_free( (*postread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx );
|
||||
slap_sl_free( *postread_ctrl, op->o_tmpmemctx );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user