]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/overlays/constraint.c
ITS#6758 Avoid SlapReply reuse, simple cases.
[openldap] / servers / slapd / overlays / constraint.c
index 9027dbb6b91305b1533074eb42d962ca90390903..fcb2830ee88cbf2e45d344ba3537fdfac10ee36e 100644 (file)
@@ -556,7 +556,6 @@ constraint_violation( constraint *c, struct berval *bv, Operation *op )
                Operation nop = *op;
                slap_overinst *on = (slap_overinst *) op->o_bd->bd_info;
                slap_callback cb;
-               SlapReply nrs = { REP_RESULT };
                int i;
                int found = 0;
                int rc;
@@ -640,6 +639,8 @@ constraint_violation( constraint *c, struct berval *bv, Operation *op )
                        rc = LDAP_OTHER;
 
                } else {
+                       SlapReply nrs = { REP_RESULT };
+
                        Debug(LDAP_DEBUG_TRACE, 
                                "==> constraint_violation uri filter = %s\n",
                                filterstr.bv_val, 0, 0);