From 65f891d7a279b542250b311f4f114d80d97b3d97 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 26 Jul 2013 13:15:58 -0700 Subject: [PATCH] ITS#7641 don't muck with controls if slapi doesn't use them --- servers/slapd/slapi/slapi_overlay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ); -- 2.39.5