From: Howard Chu Date: Sun, 9 Sep 2007 14:25:34 +0000 (+0000) Subject: re: prev commit, init j X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~671 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c32e182c56f6021f776603370bde94a6fd5e521e;p=openldap re: prev commit, init j --- 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 );