This matches the behavior for smb1 requests
and avoids an additional malloc() per request.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
(cherry picked from commit
9d33a3f3e814e2924a423496ccc133c6c73fcd12)
/* Enable this to find subtle valgrind errors. */
mem_pool = talloc_init("smbd_smb2_request_allocate");
#else
- mem_pool = talloc_pool(mem_ctx, 8192);
+ mem_pool = talloc_tos();
#endif
if (mem_pool == NULL) {
return NULL;
return NULL;
}
talloc_reparent(mem_pool, mem_ctx, req);
+#if 0
TALLOC_FREE(mem_pool);
+#endif
req->last_session_id = UINT64_MAX;
req->last_tid = UINT32_MAX;