summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c5
-rw-r--r--xlators/mount/fuse/src/fuse-helpers.c12
2 files changed, 11 insertions, 6 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index 9ce1fdee13d..ec5c6f60fad 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -4095,6 +4095,11 @@ fuse_first_lookup (xlator_t *this)
dict = dict_new ();
frame = create_frame (this, this->ctx->pool);
+ if (!frame) {
+ gf_log ("fuse", GF_LOG_ERROR, "failed to create frame");
+ return -1;
+ }
+
frame->root->type = GF_OP_TYPE_FOP;
xl = priv->active_subvol;
diff --git a/xlators/mount/fuse/src/fuse-helpers.c b/xlators/mount/fuse/src/fuse-helpers.c
index 7fc41383c36..a28169a0021 100644
--- a/xlators/mount/fuse/src/fuse-helpers.c
+++ b/xlators/mount/fuse/src/fuse-helpers.c
@@ -259,16 +259,16 @@ static void get_groups(fuse_private_t *priv, call_frame_t *frame)
const gid_list_t *gl;
gid_list_t agl;
+ if (!priv || !priv->gid_cache_timeout) {
+ frame_fill_groups(frame);
+ return;
+ }
+
if (-1 == priv->gid_cache_timeout) {
frame->root->ngrps = 0;
return;
}
- if (!priv->gid_cache_timeout) {
- frame_fill_groups(frame);
- return;
- }
-
gl = gid_cache_lookup(&priv->gid_cache, frame->root->pid,
frame->root->uid, frame->root->gid);
if (gl) {
@@ -326,7 +326,7 @@ get_call_frame_for_req (fuse_state_t *state)
state->lk_owner);
}
- get_groups(priv, frame);
+ get_groups(priv, frame);
if (priv && priv->client_pid_set)
frame->root->pid = priv->client_pid;