el->flags, el->name);
return LDB_ERR_UNWILLING_TO_PERFORM;
}
- if (dsdb_check_single_valued_link(schema_attr, el) != LDB_SUCCESS) {
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+ ret = dsdb_check_single_valued_link(schema_attr, el);
+ if (ret != LDB_SUCCESS) {
ldb_asprintf_errstring(ldb,
"Attribute %s is single valued but more than one value has been supplied",
el->name);
el->flags |= LDB_FLAG_INTERNAL_DISABLE_SINGLE_VALUE_CHECK;
}
- if (ret != LDB_SUCCESS) {
- return ret;
- }
if (old_el) {
ldb_msg_remove_attr(old_msg, el->name);
}