From: Pierangelo Masarati Date: Fri, 14 Sep 2007 23:14:33 +0000 (+0000) Subject: fix ITS#5136 X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~641 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=927efd4a94787b5dc80a074b855eb7a37a98f8b5;p=openldap fix ITS#5136 --- diff --git a/servers/slapd/value.c b/servers/slapd/value.c index f6332eea62..4dfca8a662 100644 --- a/servers/slapd/value.c +++ b/servers/slapd/value.c @@ -718,7 +718,7 @@ ordered_value_add( } new = ch_malloc( (anum+vnum+1) * sizeof(struct berval)); - if ( a->a_nvals && a->a_nvals != a->a_vals ) { + if ( ( a->a_nvals && a->a_nvals != a->a_vals ) || ( nvals != NULL && nvals != vals ) ) { nnew = ch_malloc( (anum+vnum+1) * sizeof(struct berval)); /* Shouldn't happen... */ if ( !nvals ) nvals = vals;