diff options
author | Volker Lendecke <vl@samba.org> | 2010-02-20 15:15:28 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-02-22 23:23:18 +0100 |
commit | 036fcafe242363bd290b179c21406dafc0d3a678 (patch) | |
tree | 95ead4adf6ba1c702928d27c0798e7e997800d26 /source3/libsmb | |
parent | 47c61b4f15a8b366e51bc0de0a3427eecd0d65a3 (diff) | |
download | samba-036fcafe242363bd290b179c21406dafc0d3a678.tar.gz samba-036fcafe242363bd290b179c21406dafc0d3a678.tar.bz2 samba-036fcafe242363bd290b179c21406dafc0d3a678.zip |
s3: Explicitly handle inbuf in cli_sesssetup_blob_done
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/cliconnect.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index f24582df00..53d46be585 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -730,12 +730,13 @@ static void cli_sesssetup_blob_done(struct tevent_req *subreq) NTSTATUS status; uint8_t *p; uint16_t blob_length; + uint8_t *inbuf; - status = cli_smb_recv(subreq, NULL, NULL, 1, &wct, &vwv, + status = cli_smb_recv(subreq, state, &inbuf, 1, &wct, &vwv, &num_bytes, &bytes); + TALLOC_FREE(subreq); if (!NT_STATUS_IS_OK(status) && !NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { - TALLOC_FREE(subreq); tevent_req_nterror(req, status); return; } @@ -743,12 +744,11 @@ static void cli_sesssetup_blob_done(struct tevent_req *subreq) state->status = status; TALLOC_FREE(state->buf); - state->inbuf = (char *)cli_smb_inbuf(subreq); + state->inbuf = (char *)inbuf; cli->vuid = SVAL(state->inbuf, smb_uid); blob_length = SVAL(vwv+3, 0); if (blob_length > num_bytes) { - TALLOC_FREE(subreq); tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE); return; } @@ -771,7 +771,6 @@ static void cli_sesssetup_blob_done(struct tevent_req *subreq) } if (state->blob.length != 0) { - TALLOC_FREE(subreq); /* * More to send */ |