From: Luke Howard Date: Wed, 30 Mar 2011 10:03:39 +0000 (+1100) Subject: slapi_attr_add_value should use attr_valadd to set a_numvals X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4f0dc06553786ad5fbee6e307d29e7216c3e27f5;hp=cf49e43f86de16f1cc84ab44f6d4fa3c7e18902f;p=openldap slapi_attr_add_value should use attr_valadd to set a_numvals --- diff --git a/servers/slapd/slapi/slapi_utils.c b/servers/slapd/slapi/slapi_utils.c index 77c02c6938..66687946c1 100644 --- a/servers/slapd/slapi/slapi_utils.c +++ b/servers/slapd/slapi/slapi_utils.c @@ -2108,12 +2108,7 @@ int slapi_attr_add_value( Slapi_Attr *a, const Slapi_Value *v ) nvalp = NULL; } - rc = value_add_one( &a->a_vals, (Slapi_Value *)v ); - if ( rc == 0 && nvalp != NULL ) { - rc = value_add_one( &a->a_nvals, nvalp ); - } else { - a->a_nvals = a->a_vals; - } + rc = attr_valadd( a, (Slapi_Value *)v, nvalp, 1 ); if ( nvalp != NULL ) { slapi_ch_free_string( &nval.bv_val );