diff options
Diffstat (limited to 'source3/libsmb/smb2cli_base.c')
-rw-r--r-- | source3/libsmb/smb2cli_base.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/libsmb/smb2cli_base.c b/source3/libsmb/smb2cli_base.c index f8b2f6e5df..b85158f8c7 100644 --- a/source3/libsmb/smb2cli_base.c +++ b/source3/libsmb/smb2cli_base.c @@ -690,9 +690,8 @@ NTSTATUS smb2cli_req_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, bool found_size = false; size_t i; - if (num_expected == 0) { - found_status = true; - found_size = true; + if (piov != NULL) { + *piov = NULL; } if (tevent_req_is_nterror(req, &status)) { @@ -710,6 +709,11 @@ NTSTATUS smb2cli_req_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, return status; } + if (num_expected == 0) { + found_status = true; + found_size = true; + } + status = NT_STATUS(IVAL(state->recv_iov[0].iov_base, SMB2_HDR_STATUS)); body_size = SVAL(state->recv_iov[1].iov_base, 0); |