From b0d65f827e2314e907b5fd4768c55ae4c816e8da Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 11 Apr 2010 12:53:00 +0200 Subject: s3: Use talloc_stackframe() in user_in_group --- source3/auth/auth_util.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index 93f9d19b61..b7a5aee2c5 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -1099,16 +1099,10 @@ bool user_in_group_sid(const char *username, const DOM_SID *group_sid) bool user_in_group(const char *username, const char *groupname) { - TALLOC_CTX *mem_ctx; + TALLOC_CTX *mem_ctx = talloc_stackframe(); DOM_SID group_sid; bool ret; - mem_ctx = talloc_new(NULL); - if (mem_ctx == NULL) { - DEBUG(0, ("talloc_new failed\n")); - return False; - } - ret = lookup_name(mem_ctx, groupname, LOOKUP_NAME_ALL, NULL, NULL, &group_sid, NULL); TALLOC_FREE(mem_ctx); -- cgit