summaryrefslogtreecommitdiff
path: root/source3/libsmb/smb2cli_base.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb/smb2cli_base.c')
-rw-r--r--source3/libsmb/smb2cli_base.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/libsmb/smb2cli_base.c b/source3/libsmb/smb2cli_base.c
index af2d10026d..b12e939a39 100644
--- a/source3/libsmb/smb2cli_base.c
+++ b/source3/libsmb/smb2cli_base.c
@@ -77,8 +77,8 @@ static void smb2cli_req_unset_pending(struct tevent_req *req)
/*
* Remove ourselves from the cli->pending array
*/
- if (num_pending > 1) {
- cli->pending[i] = cli->pending[num_pending-1];
+ for (; i < (num_pending - 1); i++) {
+ cli->pending[i] = cli->pending[i+1];
}
/*