s3:auth fix a compiler warning
authorChristian Ambach <ambi@samba.org>
Sat, 15 Sep 2012 20:47:06 +0000 (22:47 +0200)
committerChristian Ambach <ambi@samba.org>
Sun, 16 Sep 2012 18:50:11 +0000 (11:50 -0700)
source3/auth/token_util.c

index aad34cbfbc2ccf1872601c7a35bad8f5a56a5527..a618e214cf760b15fbcad52d0001d945bcb31043 100644 (file)
@@ -858,7 +858,7 @@ bool user_sid_in_group_sid(const struct dom_sid *sid, const struct dom_sid *grou
        gid_t gid;
        char *found_username;
        struct security_token *token;
-       bool result;
+       bool result = false;
        enum lsa_SidType type;
        TALLOC_CTX *mem_ctx = talloc_stackframe();
 
@@ -880,8 +880,7 @@ bool user_sid_in_group_sid(const struct dom_sid *sid, const struct dom_sid *grou
 
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(10, ("could not create token for %s\n", dom_sid_string(mem_ctx, sid)));
-               TALLOC_FREE(mem_ctx);
-               return False;
+               goto done;
        }
 
        result = security_token_has_sid(token, group_sid);