list = *listp;
if ( !list ) {
size = 2;
- list = calloc(size, sizeof(AttributeType *));
+ list = ch_calloc(size, sizeof(AttributeType *));
if ( !list ) {
return -1;
}
list1++;
}
size += 2;
- list1 = realloc(list, size*sizeof(AttributeType *));
+ list1 = ch_realloc(list, size*sizeof(AttributeType *));
if ( !list1 ) {
return -1;
}
}
list[i] = NULL;
/* Tell the runtime this can be shrinked */
- list1 = realloc(list, (i+1)*sizeof(AttributeType **));
+ list1 = ch_realloc(list, (i+1)*sizeof(AttributeType **));
if ( !list1 ) {
return -1;
}
char *cname;
if ( at->at_names && at->at_names[0] ) {
+ int i;
+
+ for( i=0; at->at_names[i]; i++ ) {
+ if( !slap_valid_descr( at->at_names[i] ) ) {
+ return SLAP_SCHERR_BAD_DESCR;
+ }
+ }
+
cname = at->at_names[0];
+
} else if ( at->at_oid ) {
cname = at->at_oid;
} else {
- cname = "";
return SLAP_SCHERR_ATTR_INCOMPLETE;
}
}
code = at_insert(sat,err);
+ return code;
}
#ifdef LDAP_DEBUG