r25035: Fix some more warnings, use service pointer rather than service number in...
[kai/samba-autobuild/.git] / source4 / smb_server / smb2 / receive.c
index 6a36d2f3658a5e6fd54fff22e6cd498790fc61c2..e783620e52a594f94645597d14b662d59bb06e74 100644 (file)
@@ -82,7 +82,8 @@ NTSTATUS smb2srv_setup_reply(struct smb2srv_request *req, uint16_t body_fixed_si
        req->out.size           = SMB2_HDR_BODY+NBT_HDR_SIZE+body_fixed_size;
 
        req->out.allocated      = req->out.size + body_dynamic_size;
-       req->out.buffer         = talloc_size(req, req->out.allocated);
+       req->out.buffer         = talloc_array(req, uint8_t, 
+                                              req->out.allocated);
        NT_STATUS_HAVE_NO_MEMORY(req->out.buffer);
 
        req->out.hdr            = req->out.buffer       + NBT_HDR_SIZE;