ITS#7431 fix constraint_check_restrict segfault

This commit is contained in:
Jan Synacek 2012-11-26 13:49:14 -08:00 committed by Howard Chu
parent f13ba102e1
commit 3c19681372

View file

@ -935,10 +935,6 @@ constraint_update( Operation *op, SlapReply *rs )
/* Do we need to count attributes? */
for(cp = c; cp; cp = cp->ap_next) {
if (cp->restrict_lud && constraint_check_restrict(op, cp, target_entry) == 0) {
continue;
}
if (cp->count != 0) {
if (rc != 0 || target_entry == NULL) {
Debug(LDAP_DEBUG_TRACE,
@ -950,6 +946,10 @@ constraint_update( Operation *op, SlapReply *rs )
goto mod_violation;
}
if (cp->restrict_lud && constraint_check_restrict(op, cp, target_entry) == 0) {
continue;
}
is_v = constraint_check_count_violation(m, target_entry, cp);
Debug(LDAP_DEBUG_TRACE,