]> git.sur5r.net Git - openldap/commitdiff
tolerate that config_get_vals() returns success with no values (ITS#4341)
authorPierangelo Masarati <ando@openldap.org>
Sat, 14 Jan 2006 10:21:47 +0000 (10:21 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 14 Jan 2006 10:21:47 +0000 (10:21 +0000)
servers/slapd/bconfig.c

index 18a22edcb9d0f56e4c3dcbf29a34688e1e289616..c2974c3fbda52ee1f16c6800cc779ba0a82c0cbe 100644 (file)
@@ -4211,7 +4211,9 @@ config_build_attrs( Entry *e, AttributeType **at, AttributeDescription *ad,
                for (i=0;ct[i].name;i++) {
                        if (ct[i].ad == (*at)->sat_ad) {
                                rc = config_get_vals(&ct[i], c);
-                               if (rc == LDAP_SUCCESS) {
+                               /* NOTE: tolerate that config_get_vals()
+                                * returns success with no values */
+                               if (rc == LDAP_SUCCESS && c->rvalue_vals != NULL ) {
                                        if ( c->rvalue_nvals )
                                                attr_merge(e, ct[i].ad, c->rvalue_vals,
                                                        c->rvalue_nvals);