mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
s4-drs: Don't skip over elements in uref_del_dest()
If we remove an element, we should not skip over the element following. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
parent
b5b611d90f
commit
f273dcf6c5
@ -144,6 +144,11 @@ static WERROR uref_del_dest(struct ldb_context *sam_ctx, TALLOC_CTX *mem_ctx,
|
|||||||
if (i+1 < reps.count) {
|
if (i+1 < reps.count) {
|
||||||
memmove(&reps.r[i], &reps.r[i+1], sizeof(reps.r[i])*(reps.count-(i+1)));
|
memmove(&reps.r[i], &reps.r[i+1], sizeof(reps.r[i])*(reps.count-(i+1)));
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
* If we remove an element, decrement i so that we don't
|
||||||
|
* skip over the element following.
|
||||||
|
*/
|
||||||
|
i--;
|
||||||
reps.count--;
|
reps.count--;
|
||||||
found = true;
|
found = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user