get_req_groups has two problems: first, it doesn't free the array if
fuse_getgroups errors out; and it passes errors to its caller. The
memory leak is an obvious fix, but in the error case we actually want to
fall back to checking the sole gid that the fuse request context gave
us. Fix both of these errors.
Cc: <linux-ext4@vger.kernel.org> # v1.47.3 Fixes: 3469e6ff606af8 ("fuse2fs: fix group membership checking in op_chmod") Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>