From: Timothy Pearson Date: Fri, 26 Jul 2013 20:15:58 +0000 (-0700) Subject: ITS#7641 don't muck with controls if slapi doesn't use them X-Git-Tag: OPENLDAP_REL_ENG_2_4_36~28 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=959f0a2eb7e9034b3e5cf1b636fad9a750416163;p=openldap ITS#7641 don't muck with controls if slapi doesn't use them --- diff --git a/servers/slapd/slapi/slapi_overlay.c b/servers/slapd/slapi/slapi_overlay.c index ad23153e22..b4fb258f6c 100644 --- a/servers/slapd/slapi/slapi_overlay.c +++ b/servers/slapd/slapi/slapi_overlay.c @@ -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 );