diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index db87e5205c..7ed492ef29 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -2695,10 +2695,10 @@ attr_cmp( Operation *op, Attribute *old, Attribute *new, for ( o=0; old->a_vals[o].bv_val; o++ ) ; for ( n=0; new->a_vals[n].bv_val; n++ ) ; - /* there MUST be both onld and new values - * (otherwise j is used uninitialized) */ + /* there MUST be both old and new values */ assert( o != 0 ); assert( n != 0 ); + j = 0; adds = op->o_tmpalloc( sizeof(struct berval *) * n, op->o_tmpmemctx ); dels = op->o_tmpalloc( sizeof(struct berval *) * o, op->o_tmpmemctx );