summaryrefslogtreecommitdiffstats
path: root/source3/smbd/smb2_server.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-12-04 15:28:11 +0100
committerJeremy Allison <jra@samba.org>2014-03-05 13:59:23 -0800
commitcf77f16e3aa60258813b030f8a7f2e0cdd576368 (patch)
tree41e336e84398d0bfe3206bb2efd46cf6c7687fab /source3/smbd/smb2_server.c
parent2edc7308d6185d724f38e602520617121ef57672 (diff)
downloadsamba-cf77f16e3aa60258813b030f8a7f2e0cdd576368.tar.gz
samba-cf77f16e3aa60258813b030f8a7f2e0cdd576368.tar.xz
samba-cf77f16e3aa60258813b030f8a7f2e0cdd576368.zip
s3:smb2_server: don't assume that req->out.vector is always a valid talloc pointer
We use 'req' instead as it has the same lifetime. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/smbd/smb2_server.c')
-rw-r--r--source3/smbd/smb2_server.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index cda36221557..ceee35d05a2 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -928,7 +928,7 @@ DATA_BLOB smbd_smb2_generate_outbody(struct smbd_smb2_request *req, size_t size)
}
}
- return data_blob_talloc(req->out.vector, NULL, size);
+ return data_blob_talloc(req, NULL, size);
}
static NTSTATUS smbd_smb2_request_setup_out(struct smbd_smb2_request *req)
@@ -2348,7 +2348,7 @@ static NTSTATUS smbd_smb2_request_reply(struct smbd_smb2_request *req)
return NT_STATUS_NO_MEMORY;
}
- tf = talloc_zero_array(req->out.vector, uint8_t,
+ tf = talloc_zero_array(req, uint8_t,
SMB2_TF_HDR_SIZE);
if (tf == NULL) {
return NT_STATUS_NO_MEMORY;
@@ -2582,7 +2582,7 @@ NTSTATUS smbd_smb2_request_done_ex(struct smbd_smb2_request *req,
*/
uint8_t *pad;
- pad = talloc_zero_array(req->out.vector,
+ pad = talloc_zero_array(req,
uint8_t, pad_size);
if (pad == NULL) {
return smbd_smb2_request_error(req,
@@ -2605,7 +2605,7 @@ NTSTATUS smbd_smb2_request_done_ex(struct smbd_smb2_request *req,
old_dyn = SMBD_SMB2_OUT_DYN_PTR(req);
new_size = old_size + pad_size;
- new_dyn = talloc_zero_array(req->out.vector,
+ new_dyn = talloc_zero_array(req,
uint8_t, new_size);
if (new_dyn == NULL) {
return smbd_smb2_request_error(req,