]> git.sur5r.net Git - openldap/commitdiff
fix ITS#5136
authorPierangelo Masarati <ando@openldap.org>
Fri, 14 Sep 2007 23:14:33 +0000 (23:14 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 14 Sep 2007 23:14:33 +0000 (23:14 +0000)
servers/slapd/value.c

index f6332eea62055ae5223a06fa6be83dc018822078..4dfca8a662ea3d46e80cc37fbd103db5c229be8e 100644 (file)
@@ -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;