[Pkg-samba-maint] [samba] 115/135: s3:smb2_server: allocate smbd_smb2_request on talloc_tos()
Ivo De Decker
ivodd at moszumanska.debian.org
Sat Jan 11 21:30:31 UTC 2014
This is an automated email from the git hooks/post-receive script.
ivodd pushed a commit to branch master
in repository samba.
commit a399931c3949c06a978fc392060e9df8bea8be61
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Oct 16 09:15:12 2013 +0200
s3:smb2_server: allocate smbd_smb2_request on talloc_tos()
This matches the behavior for smb1 requests
and avoids an additional malloc() per request.
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: David Disseldorp <ddiss at samba.org>
(cherry picked from commit 9d33a3f3e814e2924a423496ccc133c6c73fcd12)
---
source3/smbd/smb2_server.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index b179a0b..b855037 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -269,7 +269,7 @@ static struct smbd_smb2_request *smbd_smb2_request_allocate(TALLOC_CTX *mem_ctx)
/* 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;
@@ -281,7 +281,9 @@ static struct smbd_smb2_request *smbd_smb2_request_allocate(TALLOC_CTX *mem_ctx)
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;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git
More information about the Pkg-samba-maint
mailing list