From: Pierangelo Masarati Date: Sat, 14 Jan 2006 10:21:47 +0000 (+0000) Subject: tolerate that config_get_vals() returns success with no values (ITS#4341) X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~317 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e720c15c4d82d975bf9ce6e7e3a347264d8b0d8d;p=openldap tolerate that config_get_vals() returns success with no values (ITS#4341) --- diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index 18a22edcb9..c2974c3fbd 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -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);