1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

smbd: Use brl_delete_lock_struct in brl_lock_cancel_default

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2014-07-03 10:18:36 +00:00 committed by Jeremy Allison
parent f93ae07679
commit 28df2b0d0d

View File

@ -1509,12 +1509,7 @@ bool brl_lock_cancel_default(struct byte_range_lock *br_lck,
return False;
}
if (i < br_lck->num_locks - 1) {
/* Found this particular pending lock - delete it */
memmove(&locks[i], &locks[i+1],
sizeof(*locks)*((br_lck->num_locks-1) - i));
}
brl_delete_lock_struct(locks, br_lck->num_locks, i);
br_lck->num_locks -= 1;
br_lck->modified = True;
return True;