ITS#7641 don't muck with controls if slapi doesn't use them

This commit is contained in:
Timothy Pearson 2013-07-26 13:15:58 -07:00 committed by Howard Chu
parent 96bf741367
commit 65f891d7a2

View file

@ -454,11 +454,11 @@ slapi_over_merge_controls( Operation *op, SlapReply *rs )
n_slapi_ctrls = slapi_int_count_controls( slapi_ctrls );
n_rs_ctrls = slapi_int_count_controls( rs->sr_ctrls );
slapi_pblock_set( pb, SLAPI_X_OLD_RESCONTROLS, (void *)rs->sr_ctrls );
if ( n_slapi_ctrls == 0 )
return LDAP_SUCCESS; /* no SLAPI controls */
slapi_pblock_set( pb, SLAPI_X_OLD_RESCONTROLS, (void *)rs->sr_ctrls );
ctrls = (LDAPControl **) op->o_tmpalloc(
( n_slapi_ctrls + n_rs_ctrls + 1 ) * sizeof(LDAPControl *),
op->o_tmpmemctx );