diff options
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/async_smb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c index 5396d22881..488e953436 100644 --- a/source3/libsmb/async_smb.c +++ b/source3/libsmb/async_smb.c @@ -162,7 +162,9 @@ void cli_smb_req_unset_pending(struct tevent_req *req) /* * Remove ourselves from the cli->conn.pending array */ - cli->conn.pending[i] = cli->conn.pending[num_pending-1]; + for (; i < (num_pending - 1); i++) { + cli->conn.pending[i] = cli->conn.pending[i+1]; + } /* * No NULL check here, we're shrinking by sizeof(void *), and |